cvs: phpweb /error index.php
| From: | Jim Winstead | Date: | Fri, 12 Jan 2001 21:11:07 +0000 |
| Subject: | cvs: phpweb /error index.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-3376@lists.php.net to get a copy of this message | ||
jimw Fri Jan 12 13:11:08 2001 EDT
Modified files:
/phpweb/error index.php
Log:
clean up, hopefully fix
Index: phpweb/error/index.php
diff -u phpweb/error/index.php:1.9 phpweb/error/index.php:1.10
--- phpweb/error/index.php:1.9 Fri Jan 12 12:59:57 2001
+++ phpweb/error/index.php Fri Jan 12 13:11:07 2001
@@ -1,5 +1,9 @@
<?php
+require "shared.inc";
+
+$lang = $MIRRORS[$MYSITE][6];
+
# handle .php3 files that were renamed to .php
if (preg_match("/(.*\.php)3$/", $REQUEST_URI, $array)) {
if($SERVER_PORT!=80) {
@@ -17,11 +21,11 @@
}
# handle moving english manual down into its own directory
-if (eregi("/manual/([^/]+.php3?)", $REQUEST_URI, $array)) {
+if (eregi("^(.*)/manual/([^/]+.php3?)", $REQUEST_URI, $array)) {
if($SERVER_PORT!=80) {
- $url = "http://".$SERVER_NAME.":".$SERVER_PORT."/manual/$DEFAULT_LANG/".$array[1];
+ $url = "http://".$SERVER_NAME.":".$SERVER_PORT."$array[1]/manual/$lang/".$array[2];
} else {
- $url = "http://".$SERVER_NAME."/manual/$DEFAULT_LANG/".$array[1];
+ $url = "http://".$SERVER_NAME."$array[1]/manual/$lang/".$array[2];
}
$urle = htmlspecialchars($url);
@@ -43,8 +47,9 @@
$lang = strtolower($lang);
} else {
$function = strtolower($uri);
- $lang = $MIRRORS[$MYSITE][6];
}
+
+if (!$lang) $lang = $MIRRORS[$MYSITE][6];
$try = find_manual_page($lang, $function);
if ($try) {