cvs: phpweb / error.php
| From: | Gabor Hojtsy | Date: | Sat, 27 Sep 2003 17:54:04 +0000 |
| Subject: | cvs: phpweb / error.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-21240@lists.php.net to get a copy of this message | ||
goba Sat Sep 27 13:54:04 2003 EDT
Modified files:
/phpweb error.php
Log:
Provide access to the tableless manual page rendering mode
via URLs, like /manual/en/tableless/function.echo.php for
testing purposes (this will replace the current rendering mode if
it works across common browsers)
Index: phpweb/error.php
diff -u phpweb/error.php:1.10 phpweb/error.php:1.11
--- phpweb/error.php:1.10 Sat Sep 6 05:14:58 2003
+++ phpweb/error.php Sat Sep 27 13:54:04 2003
@@ -1,6 +1,6 @@
<?php
-// $Id: error.php,v 1.10 2003/09/06 09:14:58 goba Exp $
+// $Id: error.php,v 1.11 2003/09/27 17:54:04 goba Exp $
/*
@@ -55,11 +55,15 @@
// and not redirected, as this way all relative URL's will retain their meaning
// and point to pages relative to the print dir (which is nonexistent)
// We need to override the 404 status in these cases too.
-if (preg_match("!^manual/(\\w+)/(print|printwn)/(.+\\.php)$!", $URI, $parts) &&
+if (preg_match("!^manual/(\\w+)/(print|printwn|tableless)/(.+\\.php)$!", $URI, $parts)
&&
@file_exists($_SERVER['DOCUMENT_ROOT'] . "/manual/$parts[1]/$parts[3]")) {
status_header(200);
- $PRINT_PAGE = TRUE;
- if ($parts[2] == "printwn") { $PRINT_NOTES = TRUE; }
+ if (in_array($parts[2], array('print', 'printwn'))) {
+ $PRINT_PAGE = TRUE;
+ if ($parts[2] == "printwn") { $PRINT_NOTES = TRUE; }
+ } else {
+ $NOTABLES = TRUE;
+ }
include $_SERVER['DOCUMENT_ROOT'] . "/manual/$parts[1]/$parts[3]";
exit;
}
@@ -74,11 +78,15 @@
}
// The index file needs to be handled in a special way
-elseif (preg_match("!^manual/(\\w+)/(print|printwn|html)(/)?$!", $URI, $parts) &&
+elseif (preg_match("!^manual/(\\w+)/(print|printwn|html|tableless)(/)?$!", $URI, $parts)
&&
@file_exists($_SERVER['DOCUMENT_ROOT'] .
"/manual/$parts[1]/index.php")) {
status_header(200);
- $PRINT_PAGE = TRUE;
- if ($parts[2] == "printwn") { $PRINT_NOTES = TRUE; }
+ if (in_array($parts[2], array('print', 'printwn', 'html'))) {
+ $PRINT_PAGE = TRUE;
+ if ($parts[2] == "printwn") { $PRINT_NOTES = TRUE; }
+ } else {
+ $NOTABLE = TRUE;
+ }
include $_SERVER['DOCUMENT_ROOT'] . "/manual/$parts[1]/index.php";
exit;
}
@@ -247,4 +255,4 @@
'&pattern=' . urlencode(substr($_SERVER['REQUEST_URI'], 1))
);
-?>
\ No newline at end of file
+?>