X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fcore.php;h=b7def03ef0cf9b7554fff4bb7b81ae343dc7e850;hb=1d10d3fd659fa8eb7c663d6bb599bc8bbc0feeb3;hp=787e23654df9f49fabadb31a203fa2262bac268b;hpb=8b00e0e0c6f303762f6740c853e7065b1471d245;p=platal.git diff --git a/modules/core.php b/modules/core.php index 787e236..b7def03 100644 --- a/modules/core.php +++ b/modules/core.php @@ -29,6 +29,7 @@ class CoreModule extends PLModule '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), ); } @@ -40,16 +41,24 @@ class CoreModule extends PLModule function handler_403(&$page) { - header('HTTP/1.0 403 Forbidden'); + header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden'); $page->changeTpl('403.tpl'); } function handler_404(&$page) { - header('HTTP/1.0 404 Not Found'); + header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found'); $page->changeTpl('404.tpl'); } + function handler_favicon(&$page) + { + $data = file_get_contents(dirname(__FILE__).'/../htdocs/images/favicon.png'); + header('Content-Type: image/png'); + echo $data; + exit; + } + function handler_purge_cache(&$page) { require_once 'wiki.inc.php';