/*
* brisk - auth.phh
*
- * Copyright (C) 2006-2008 Matteo Nastasi
+ * Copyright (C) 2006-2011 Matteo Nastasi
* mailto: nastasi@alternativeoutput.it
* matteo.nastasi@milug.org
* web: http://www.alternativeoutput.it
log_auth("xxx", sprintf("Hardbans::add [%s]\n", $login));
- if (($chal = new Hardban($login, $ip, $session, $timeout)) == null) {
- return ($G_false);
+ if (($chal = new Hardban($login, $ip, $session, $timeout)) == FALSE) {
+ return (FALSE);
}
$this->item[$this->item_n] = $chal;
}
// Static functions
- function &init_data()
+ static function create()
{
$chal =& new Hardbans();
return $chal;
}
- function &load_data()
+ function load_data()
{
- GLOBAL $G_false, $sess;
+ GLOBAL $sess;
$doexit = FALSE;
do {
if (($tok = @ftok(FTOK_PATH."/hardbans", "B")) == -1) {
if ($hban == FALSE) {
log_only("INIT HARDBAN DATA");
- $hban =& Hardbans::init_data();
+ $hban =& Hardbans::create();
if (@shm_put_var($shm, $tok, $hban) == FALSE) {
log_only("PUT_VAR FALLITA ".strlen(serialize($hban)));
log_only(serialize($hban));
$hban->garbage_manager(TRUE);
- $ret = &$hban;
- return ($ret);
+ return ($hban);
} while (0);
if ($doexit)
exit();
- return ($G_false);
+ return (FALSE);
}
- function save_data(&$hban)
+ function save_data($hban)
{
$shm = FALSE;
$oldmod = $hban->mod;