cvs: php-gtk-web /include manual-lookup.inc
| From: | Andrei Zmievski | Date: | Wed, 28 Jul 2004 04:14:04 +0000 |
| Subject: | cvs: php-gtk-web /include manual-lookup.inc | ||
| Groups: | php.gtk.webmaster | ||
| Request: | Send a blank email to php-gtk-webmaster+get-2528@lists.php.net to get a copy of this message | ||
andrei Wed Jul 28 00:14:04 2004 EDT
Modified files:
/php-gtk-web/include manual-lookup.inc
Log:
Fix manual search so it actually returns something when 'connect' is
searched for. Damn if I know what the whole $full_match and
similar_text() stuff is about. Someone needs to dive into this thing and
rewrite it. Very crufty code.
http://cvs.php.net/diff.php/php-gtk-web/include/manual-lookup.inc?r1=1.7&r2=1.8&ty=u
Index: php-gtk-web/include/manual-lookup.inc
diff -u php-gtk-web/include/manual-lookup.inc:1.7 php-gtk-web/include/manual-lookup.inc:1.8
--- php-gtk-web/include/manual-lookup.inc:1.7 Mon Jun 2 10:43:24 2003
+++ php-gtk-web/include/manual-lookup.inc Wed Jul 28 00:14:04 2004
@@ -178,29 +178,32 @@
function find_manual_page($lang, $function) {
-$tried = 0;
-$hit = array();
+ $tried = 0;
+ $hit = array();
-/* fast track, single return :) */
+ /* fast track, single return :) */
if(strstr($function, "::")) {
list($funcpre, $funcpost) = split("::", $function);
$try = tryprefix($lang, $funcpost, "$funcpre.method.");
if($try) return $try;
- }
+ }
elseif(strtolower(substr($function, 0, 3)) == "gtk" ||
- strtolower(substr($function, 0, 3 == "gdk"))) {
+ strtolower(substr($function, 0, 3 == "gdk"))) {
$prefix = strtolower(substr($function, 0, 3));
$try = tryprefix($lang, $function, "$prefix.");
if($try) return $try;
- }
+ }
else {
-/* if there's no :: or gtk in there we could be looking for anything */
+ /* if there's no :: or gtk in there we could be looking for anything */
$try = wildcard($lang, $function, $hit);
- if($try) $result = array_merge($try, $result);
- }
+ /* if($try) $result = array_merge($try, $result); */
+ if ($try) return $try;
+ }
+ /*
if($result) {
return $result;
}
+ */
return "";
}