Commit:    287cce470d5a84b9b56fbfaef472779671467ae9
Author:    Levi Morrison <le...@php.net>         Sun, 24 May 2015 16:59:10 -0600
Parents:   a6c30179080b052dd004215f79fadaa2976f6022
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=287cce470d5a84b9b56fbfaef472779671467ae9

Log:
Partially fix bug #49956

This allows basic mysqli_* lookups to work, such as
mysqli_real_escape_string.

This will not fix mysqli_num_fields because the name of the page
it would link to is mysqli-result.field-count.php.

Bugs:
https://bugs.php.net/49956

Changed paths:
  M  include/manual-lookup.inc


Diff:
diff --git a/include/manual-lookup.inc b/include/manual-lookup.inc
index 77bc9e4..f01f4db 100644
--- a/include/manual-lookup.inc
+++ b/include/manual-lookup.inc
@@ -47,6 +47,18 @@ function tryprefix($lang, $keyword, $prefix)
         if (@file_exists($_SERVER['DOCUMENT_ROOT'] . $try)) { return $try; }
     }
 
+    // Replace first - with a dot and try that (for mysqli_ type entries)
+    // Only necessary when prefix is empty
+    if (empty($prefix)) {
+        $pos = strpos($keyword, '-');
+        if ($pos !== false) {
+            $keyword[$pos] = '.';
+
+            $try = "/manual/${lang}/${prefix}${keyword}.php";
+            if (@file_exists($_SERVER['DOCUMENT_ROOT'] . $try)) { return $try; 
}
+        }
+    }
+
     // Nothing found
     return "";
 }


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to