/** * Regenerate the text-based banlist files (called after a banlist table mod) */ public function regenerateFiles() { // Now regenerate the text files - so accesses of this IP address don't use the DB $ipAdministrator = new banlistManager(); $ipAdministrator->writeBanListFiles('ip,htaccess'); }
} $writeBanFile = TRUE; } // Update the ban expiry time/date - timed from now (only done on banlist) if ($action == 'newtime') { $end_time = $id ? time() + $id * 60 * 60 : 0; e107::getMessage()->addAuto($sql->db_Update('banlist', 'banlist_banexpires=' . intval($end_time) . " WHERE banlist_ip='" . $sub_action . "'")); banlist_adminlog('03', $sub_action); $action = 'list'; $writeBanFile = TRUE; } if ($writeBanFile) { /************************************************ update list of banned IPs *************************************************/ $ipAdministrator->writeBanListFiles('ip,htaccess'); if (!$ipAdministrator->doesMessageFileExist()) { $ipAdministrator->writeBanMessageFile(); // Message file must exist - may not on fresh site banlist_adminlog('08', ''); $mes->addSuccess(LAN_UPDATED); } } /** * @todo - eliminate extract(); */ // Edit modes - get existing entry if ($action == 'edit' || $action == 'whedit') { $sql->db_Select('banlist', '*', "banlist_ip='{$sub_action}'"); $row = $sql->db_Fetch(); extract($row);