cvs: phpweb /include shared-manual.inc
| From: | Hannes Magnusson | Date: | Sat, 11 Aug 2007 19:27:04 +0000 |
| Subject: | cvs: phpweb /include shared-manual.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-36195@lists.php.net to get a copy of this message | ||
bjori Sat Aug 11 19:27:04 2007 UTC
Modified files:
/phpweb/include shared-manual.inc
Log:
Ensure that we are getting the last modification time of the manual page,
not the error handler
# This has been bothering me for a while
http://cvs.php.net/viewvc.cgi/phpweb/include/shared-manual.inc?r1=1.234&r2=1.235&diff_format=u
Index: phpweb/include/shared-manual.inc
diff -u phpweb/include/shared-manual.inc:1.234 phpweb/include/shared-manual.inc:1.235
--- phpweb/include/shared-manual.inc:1.234 Wed Aug 1 17:26:22 2007
+++ phpweb/include/shared-manual.inc Sat Aug 11 19:27:04 2007
@@ -1,6 +1,6 @@
<?php // -*- C++ -*-
-// $Id: shared-manual.inc,v 1.234 2007/08/01 17:26:22 bjori Exp $
+// $Id: shared-manual.inc,v 1.235 2007/08/11 19:27:04 bjori Exp $
/*
@@ -26,7 +26,12 @@
{
global $PGI;
$PGI = array_merge($PGI, $page_data); // merge for BC reasons
- $PGI['lastmod'] = gmdate("D, d M Y", getlastmod());
+
+ // Set base page for this manual page
+ $_SERVER['BASE_PAGE'] = 'manual/' .
language_convert($PGI['head'][1]) . "/" . $PGI['this'][0];
+
+ // Set last modification time on the current manual page
+ $PGI['lastmod'] = gmdate("D, d M Y",
filemtime($_SERVER['DOCUMENT_ROOT'] ."/". $_SERVER['BASE_PAGE']));
}
// Print out HTTP headers and the HTML header
@@ -38,7 +43,7 @@
global $PGI, $LAST_UPDATED, $MYSITE;
// Get values out of the config array
- list($filename, $title) = $PGI['this'];
+ $title = $PGI['this'][1];
list($encoding, $lang) = $PGI['head'];
header("Last-Modified: " . gmdate("D, d M Y H:i:s ", $LAST_UPDATED) .
"GMT");
@@ -47,9 +52,8 @@
//header("Content-type: text/html;charset=$encoding");
header("Content-type: text/html;charset=utf-8");
header("Content-language: $lang");
-
- // Set base page and href for this manual page
- $_SERVER['BASE_PAGE'] = 'manual/' . language_convert($lang) .
"/$filename";
+
+ // Set base href for this manual page
$_SERVER['BASE_HREF'] = $MYSITE . $_SERVER['BASE_PAGE'];
manual_sidebar();