ChangeSet ID: 21062 CVSROOT: /opt/cvs-commit Module name: lostwages Changes by: jnewman@winehq.org 2005/11/02 15:39:00
Modified files: include : html.php
Log message: send a 404 header for 404 not found pages
Patch: http://cvs.winehq.org/patch.py?id=21062
Old revision New revision Changes Path 1.14 1.15 +12 -1 lostwages/include/html.php
Index: lostwages/include/html.php diff -u -p lostwages/include/html.php:1.14 lostwages/include/html.php:1.15 --- lostwages/include/html.php:1.14 2 Nov 2005 21:39: 0 -0000 +++ lostwages/include/html.php 2 Nov 2005 21:39: 0 -0000 @@ -15,6 +15,7 @@ class html var $_file_root; var $page; var $template_title; + var $in404;
// HTML init object function html ($root) @@ -66,7 +67,16 @@ class html } $search = $this->template("base", "search"); // display the html - $this->http_header(); + if ($this->in404) + { + // 404 not found + header("HTTP/1.1 404 Not Found"); + } + else + { + // normal HTTP Headers + $this->http_header(); + } echo $this->template( $theme, @@ -749,6 +759,7 @@ class html // oops not found, load 404 template if (!$in) { + $this->in404 = 1; $in = ''; if ($config->web_debug) $in = $this->p($theme."|".$template);