cvs: phpweb /error index.php
| From: | Gabor Hojtsy | Date: | Fri, 01 Aug 2003 20:59:51 +0000 |
| Subject: | cvs: phpweb /error index.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-19733@lists.php.net to get a copy of this message | ||
goba Fri Aug 1 16:59:51 2003 EDT
Modified files:
/phpweb/error index.php
Log:
Inclusion support for mirror-info, so we can test 404 handlers
directly with this script
Index: phpweb/error/index.php
diff -u phpweb/error/index.php:1.129 phpweb/error/index.php:1.130
--- phpweb/error/index.php:1.129 Tue Jul 29 07:35:24 2003
+++ phpweb/error/index.php Fri Aug 1 16:59:51 2003
@@ -1,6 +1,6 @@
<?php
-// $Id: index.php,v 1.129 2003/07/29 11:35:24 goba Exp $
+// $Id: index.php,v 1.130 2003/08/01 20:59:51 goba Exp $
/*
@@ -196,7 +196,7 @@
// Redirect if the entered URI was a PHP page name (except the books page,
// which we display in the mirror's language or the explicitly specified
// language [see below])
-if ($URI != 'books' && file_exists("$DOCUMENT_ROOT/$URI.php")) {
+if (!in_array($URI, array('books', 'mirror-info')) &&
file_exists("$DOCUMENT_ROOT/$URI.php")) {
mirror_redirect("/$URI.php");
}
@@ -207,10 +207,10 @@
mirror_redirect($external_redirects[$URI], $true_external);
}
-// Temporary hack for books, until all the pages will be
-// capable of being included from anywhere
-if ($URI == 'books') {
- include_once $_SERVER['DOCUMENT_ROOT'] . "/books.php";
+// Temporary hack for books and mirror-info, until all the pages
+// will be capable of being included from anywhere
+if (in_array($URI, array('books', 'mirror-info'))) {
+ include_once $_SERVER['DOCUMENT_ROOT'] . "/$URI.php";
}
// ============================================================================