From: Matteo Nastasi (mop) Date: Fri, 7 Mar 2008 08:51:36 +0000 (+0000) Subject: unlock_data added to garbage_manager and unescapeHTML X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=1f5795fd45dcccc42e794089d14350c6b5c5fecd;p=brisk.git unlock_data added to garbage_manager and unescapeHTML --- diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 543a57e..add31a7 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -768,6 +768,7 @@ class Room { else { log_main("ERROR: table ".$table_idx." unrecoverable join"); } + Briskin5::unlock_data($sem); } // bri::lock_data } // if ($table_cur->player_n == PLAYERS_N) { } // for ($table_idx = 0 ; $table_idx < TABLES_N ; $table_idx++) { diff --git a/web/briskin5/Obj/briskin5.phh b/web/briskin5/Obj/briskin5.phh index 11c7df3..bfaddf4 100644 --- a/web/briskin5/Obj/briskin5.phh +++ b/web/briskin5/Obj/briskin5.phh @@ -248,12 +248,13 @@ class Briskin5 { log_wr("LOCK_DATA ".FTOK_PATH."/table".$table_idx); // echo "LOCK: ".FTOK_PATH."/main"; // exit; - if (($tok = ftok(FTOK_PATH."/table".$table_idx, "B")) == -1) { + // FIXME monitor this step + if (($tok = @ftok(FTOK_PATH."/table".$table_idx, "B")) == -1) { echo "FTOK FAILED"; exit; } - // echo "FTOK ".$tok."
"; - if (($res = sem_get($tok)) == FALSE) { + // FIXME monitor this step + if (($res = @sem_get($tok)) == FALSE) { echo "SEM_GET FAILED"; exit; } diff --git a/web/commons.js b/web/commons.js index d286372..08b36a4 100644 --- a/web/commons.js +++ b/web/commons.js @@ -701,15 +701,15 @@ function set_names(so,ea,ne,nw,we) { // alert("EA: "+ea); $("name").innerHTML = so; - $("name").title = so; + $("name").title = unescapeHTML(so); $("name_ea").innerHTML = ea; - $("name_ea").title = ea; + $("name_ea").title = unescapeHTML(ea); $("name_ne").innerHTML = ne; - $("name_ne").title = ne; + $("name_ne").title = unescapeHTML(ne); $("name_nw").innerHTML = nw; - $("name_nw").title = nw; + $("name_nw").title = unescapeHTML(nw); $("name_we").innerHTML = we; - $("name_we").title = we; + $("name_we").title = unescapeHTML(we); return; } @@ -899,6 +899,36 @@ function room_checkspace(emme,tables,inpe) $("esco").innerHTML = ""; } +function unescapeHTML(cont) { + var div = document.createElement('div'); + var memo = ""; + var i; + + div.innerHTML = cont; + if (div.childNodes[0]) { + if (div.childNodes.length > 1) { + if (div.childNodes.toArray) + alert("si puo"); + else { + var length = div.childNodes.length, results = new Array(length); + while (length--) + results[length] = div.childNodes[length]; + + for (i=0 ; isess, $to_stat == "table" ? "briskin5/index.php" : "index.php")); + return (page_sync($user->sess, ($to_stat == "table" ? "briskin5/index.php" : "index.php"), $user->table, $user->table_token)); } log_rd2("lost history, refresh from scratch"); $new_step = -1;