lostwages/include html.php

Jeremy Newman jnewman at wine.codeweavers.com
Wed Nov 2 15:39:00 CST 2005


ChangeSet ID:	21062
CVSROOT:	/opt/cvs-commit
Module name:	lostwages
Changes by:	jnewman at 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);



More information about the wine-cvs mailing list