$this->make_hook('403', AUTH_PUBLIC), '404' => $this->make_hook('404', AUTH_PUBLIC), 'purge_cache' => $this->make_hook('purge_cache', AUTH_COOKIE, 'admin'), 'valid.html' => $this->make_hook('valid', AUTH_PUBLIC), 'favicon.ico' => $this->make_hook('favicon', AUTH_PUBLIC), ); } function handler_valid(&$page) { readfile($page->compile_dir.'/valid.html'); exit; } function handler_403(&$page) { header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden'); $page->changeTpl('403.tpl'); } function handler_404(&$page) { header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found'); $page->changeTpl('404.tpl'); } function handler_favicon(&$page) { $data = file_get_contents(dirname(__FILE__).'/../htdocs/images/favicon.ico'); header('Content-Type: image/x-icon'); echo $data; exit; } function handler_purge_cache(&$page) { require_once 'wiki.inc.php'; $page->clear_compiled_tpl(); wiki_clear_all_cache(); http_redirect(empty($_SERVER['HTTP_REFERER']) ? './' : $_SERVER['HTTP_REFERER']); } } ?>