cvs: phpweb / quickref.php
| From: | Gabor Hojtsy | Date: | Sun, 31 Aug 2003 19:21:25 +0000 |
| Subject: | cvs: phpweb / quickref.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-20717@lists.php.net to get a copy of this message | ||
goba Sun Aug 31 15:21:25 2003 EDT
Modified files:
/phpweb quickref.php
Log:
Fallback to English in case there is no user prefered language available
(will be better handled with livedocs)
Index: phpweb/quickref.php
diff -u phpweb/quickref.php:1.28 phpweb/quickref.php:1.29
--- phpweb/quickref.php:1.28 Fri Aug 15 06:47:22 2003
+++ phpweb/quickref.php Sun Aug 31 15:21:25 2003
@@ -1,6 +1,6 @@
<?php
-// $Id: quickref.php,v 1.28 2003/08/15 10:47:22 goba Exp $
+// $Id: quickref.php,v 1.29 2003/08/31 19:21:25 goba Exp $
/*
@@ -49,7 +49,13 @@
echo '</td></tr></table>';
}
-$dirh = opendir($_SERVER['DOCUMENT_ROOT'] . "/manual/$LANG");
+// Open directory, fall back to English,
+// if there is no dir for that language
+$dirh = @opendir($_SERVER['DOCUMENT_ROOT'] . "/manual/$LANG");
+if (!$dirh) {
+ $dirh = opendir($_SERVER['DOCUMENT_ROOT'] . "/manual/en");
+}
+
$functions = $maybe = $temp = $parts = array();
$p = 0;