X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fauth.phh;h=963755add8edb86b81958fd9510fe8a3130ff88c;hb=182eff6ad1aafbdcb765a4190a24a1c8f2f93f6b;hp=8a3728f6dee38bd448519344bf9071d5763401ae;hpb=5431a0919f3725778cf8f09b43af3ec5c339a637;p=brisk.git diff --git a/web/Obj/auth.phh b/web/Obj/auth.phh index 8a3728f..963755a 100644 --- a/web/Obj/auth.phh +++ b/web/Obj/auth.phh @@ -22,7 +22,7 @@ * */ -require_once("Obj/dbase_pgsql.phh"); +require_once("${G_base}Obj/dbase_${G_dbasetype}.phh"); define(CHAL_SHM_DIMS_MIN, 16384); define(CHAL_SHM_DIMS_MAX, 65536); @@ -70,13 +70,13 @@ class Challenges { log_auth("xxx", sprintf("Challenges::add [%s]\n", $login)); // FIXME Checks here if ($login == '') { - return ($G_false); + return (FALSE); } // log_auth("xxx", "LOOPI tstamp: ".$this->item[$i]->tstamp." curtime: ".$curtime); - if (($chal = new Challenge($login, $token, $ip, $tstamp)) == null) { - return ($G_false); + if (($chal = new Challenge($login, $token, $ip, $tstamp)) == FALSE) { + return (FALSE); } $this->item[$this->item_n] = $chal; @@ -151,7 +151,7 @@ class Challenges { } // Static functions - function &init_data() + static function create() { $chal =& new Challenges(); @@ -160,9 +160,9 @@ class Challenges { return $chal; } - function &load_data() + function load_data() { - GLOBAL $G_false, $sess; + GLOBAL $sess; $doexit = FALSE; do { if (($tok = @ftok(FTOK_PATH."/challenges", "B")) == -1) { @@ -186,7 +186,7 @@ class Challenges { if ($chals == FALSE) { log_only("INIT CHALLENGES DATA"); - $chals =& Challenges::init_data(); + $chals =& Challenges::create(); if (@shm_put_var($shm, $tok, $chals) == FALSE) { log_only("PUT_VAR FALLITA ".strlen(serialize($chals))); log_only(serialize($chals)); @@ -199,18 +199,17 @@ class Challenges { $chals->garbage_manager(); - $ret = &$chals; - return ($ret); + return ($chals); } while (0); if ($doexit) exit(); - return ($G_false); + return (FALSE); } - function save_data(&$chals) + function save_data($chals) { $shm = FALSE; $oldmod = $chals->mod;