cvs: phpweb / manual-lookup.php
| From: | Hojtsy Gabor | Date: | Thu, 23 Nov 2000 08:30:03 +0000 |
| Subject: | cvs: phpweb / manual-lookup.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-2927@lists.php.net to get a copy of this message | ||
goba Thu Nov 23 00:30:03 2000 EDT
Modified files:
/phpweb manual-lookup.php
Log:
International preference within the quickref box.
If no native language entry found, try the english.
I hope it will work, and you find it allright...
Index: phpweb/manual-lookup.php
diff -u phpweb/manual-lookup.php:1.3 phpweb/manual-lookup.php:1.4
--- phpweb/manual-lookup.php:1.3 Fri Oct 6 14:02:45 2000
+++ phpweb/manual-lookup.php Thu Nov 23 00:30:03 2000
@@ -1,25 +1,35 @@
<?php // -*- C++ -*-
+require("shared.inc");
+
$try_files = array();
$function = strtolower($function);
function tryprefix($func, $prefix) {
- global $try_files;
+ global $try_files, $MIRRORS, $MYSITE;
+ // Get the country code, to find native
+ // language manual entries first
+ $cc = $MIRRORS[$MYSITE][2];
+
$func = ereg_replace("_","-",$func);
$func = ereg_replace('\(.*\)',"-",$func);
+ $try_files[] = "/manual/${cc}/${prefix}${func}.php";
$try_files[] = "/manual/${prefix}${func}.php";
$nosp = ereg_replace(" ", "", $func);
if ($nosp != $func) {
+ $try_files[] = "/manual/${cc}/${prefix}${nosp}.php";
$try_files[] = "/manual/${prefix}${nosp}.php";
}
$dasp = ereg_replace(" ", "-", $func);
if ($dasp != $func) {
+ $try_files[] = "/manual/${cc}/${prefix}${dasp}.php";
$try_files[] = "/manual/${prefix}${dasp}.php";
}
$noul = ereg_replace("-", "", $func);
if ($noul != $func) {
+ $try_files[] = "/manual/${cc}/${prefix}${noul}.php";
$try_files[] = "/manual/${prefix}${noul}.php";
}
}
@@ -43,7 +53,6 @@
exit;
-require("shared.inc");
CommonHeader("Quick Manual Reference");
?>