function loadGlines() { $res = db_query('select * from os_glines order by gline_id asc'); while ($row = mysql_fetch_assoc($res)) { $gline = new DB_Gline($row); if ($gline->isExpired()) { $gline->delete(); continue; } $gline_key = strtolower($gline->getMask()); $this->db_glines[$gline_key] = $gline; $this->addGline($gline->getMask(), $gline->getRemainingSecs(), $gline->getSetTs(), $gline->getLastMod(), $gline->getLifetime(), $gline->getReason(), $gline->isActive()); } debugf('Loaded %d g-lines.', count($this->db_glines)); }