From ffe7c5f4e251654501bc5a2bdd690944076ef131 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Thu, 26 Jun 2014 08:25:16 +0200 Subject: [PATCH] unused Brisk::lock_data unlock_data static methods removed --- web/Obj/brisk.phh | 22 ---------------------- web/Obj/user.phh | 4 ---- web/briskin5/Obj/briskin5.phh | 3 --- web/index_wr.php | 2 -- 4 files changed, 31 deletions(-) diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 9e0eb12..437389a 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -2255,28 +2255,6 @@ class Brisk return (FALSE); } - static function lock_data($is_exclusive) - { - if (($res = file_lock(FTOK_PATH."/main", $is_exclusive)) != FALSE) { - self::$delta_t = microtime(TRUE); - log_lock("LOCK room [".self::$delta_t."]"); - - return ($res); - } - - return (FALSE); - } - - static function unlock_data($res) - { - GLOBAL $sess; - - log_lock("UNLOCK room [".(microtime(TRUE) - (self::$delta_t))."]"); - - file_unlock($res); - } - - function standup_content($user) { $ret = ""; diff --git a/web/Obj/user.phh b/web/Obj/user.phh index d3eaffd..e06c681 100644 --- a/web/Obj/user.phh +++ b/web/Obj/user.phh @@ -691,7 +691,6 @@ class User { log_rd2("NEWSTAT: ".$this->stat); } /* if ($this->rd_step == -1) { */ else { - /* $sem = Brisk::lock_data(FALSE); */ $S_load_stat['rU_heavy']++; if ($this->rd_step < $this->step) { @@ -699,7 +698,6 @@ class User { if ($this->rd_step + COMM_N < $this->step) { if (($this->rd_stat != $this->stat)) { $to_stat = $this->stat; - /* Brisk::unlock_data($sem); */ log_load("RESYNC"); printf("xXx USER::MAINCHECK2 [%s]\n", get_class($this)); return ($this->page_sync($this->sess, ($to_stat == "table" ? "briskin5/index.php" : "index.php"), $this->table, $this->table_token)); @@ -745,8 +743,6 @@ class User { } /* if ($this->the_end == TRUE) { ... */ } /* if ($this->the_end == TRUE) { ... */ } /* if ($this->rd_step < $this->step) { */ - - /* Brisk::unlock_data($sem); */ } /* else of if ($this->rd_step == -1) { */ diff --git a/web/briskin5/Obj/briskin5.phh b/web/briskin5/Obj/briskin5.phh index ce0fa1d..46fb944 100644 --- a/web/briskin5/Obj/briskin5.phh +++ b/web/briskin5/Obj/briskin5.phh @@ -1079,7 +1079,6 @@ class Bin5_user extends User { $this->rd_step = $this->step; } /* if ($this->rd_step == -1) { */ else { - /* $sem = Brisk::lock_data(FALSE); */ $S_load_stat['rU_heavy']++; if ($this->rd_step < $this->step) { @@ -1087,7 +1086,6 @@ class Bin5_user extends User { if ($this->rd_step + COMM_N < $this->step) { if ($this->rd_stat != $this->stat) { $to_stat = $this->stat; - /* Brisk::unlock_data($sem); */ log_load("RESYNC"); printf("xXx BIN5_USER::MAINCHECK\n"); return ($this->page_sync($this->sess, ($to_stat == "table" ? "index.php" : "../index.php"), $this->table, $this->table_token)); @@ -1136,7 +1134,6 @@ class Bin5_user extends User { } /* if ($this->the_end == TRUE) { ... */ } /* if ($this->rd_step < $this->step) { */ - /* Brisk::unlock_data($sem); */ } /* else of if ($this->rd_step == -1) { */ diff --git a/web/index_wr.php b/web/index_wr.php index 2977049..9fed7de 100644 --- a/web/index_wr.php +++ b/web/index_wr.php @@ -853,8 +853,6 @@ function index_wr_main(&$brisk, $remote_addr_full, $get, $post, $cookie) } } -/* Brisk::unlock_data($sem); */ -/* exit; */ return (FALSE); } ?> -- 2.17.1