[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-13540-gf5cdef3

Michal Čihař nijel at users.sourceforge.net
Mon Aug 8 17:18:32 CEST 2011


The branch, master has been updated
       via  f5cdef3db8fe356f5bedbd8a0372c436e653aff4 (commit)
       via  aceefcb23e02daa5d4d4e357f0f6666661e7b879 (commit)
      from  2bfaa716bdb3e9e4cfa6d0a85a321328ffd7161f (commit)


- Log -----------------------------------------------------------------
commit f5cdef3db8fe356f5bedbd8a0372c436e653aff4
Author: Michal Čihař <mcihar at suse.cz>
Date:   Mon Aug 8 17:17:34 2011 +0200

    No need to mention requirements

commit aceefcb23e02daa5d4d4e357f0f6666661e7b879
Author: Michal Čihař <mcihar at suse.cz>
Date:   Mon Aug 8 17:15:59 2011 +0200

    Avoid three calls of same PMA_substr

-----------------------------------------------------------------------

Summary of changes:
 libraries/sqlparser.lib.php |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/libraries/sqlparser.lib.php b/libraries/sqlparser.lib.php
index 1037ca3..9a6df66 100644
--- a/libraries/sqlparser.lib.php
+++ b/libraries/sqlparser.lib.php
@@ -313,10 +313,11 @@ if (! defined('PMA_MINIMUM_COMMON')) {
             // MySQL style #
             // C style /* */
             // ANSI style --
+            $next_c = PMA_substr($sql, $count2 + 1, 1);
             if (($c == '#')
-                || (($count2 + 1 < $len) && ($c == '/') && (PMA_substr($sql, $count2 + 1, 1) == '*'))
-                || (($count2 + 2 == $len) && ($c == '-') && (PMA_substr($sql, $count2 + 1, 1) == '-'))
-                || (($count2 + 2 < $len) && ($c == '-') && (PMA_substr($sql, $count2 + 1, 1) == '-') && ((PMA_substr($sql, $count2 + 2, 1) <= ' ')))) {
+                || (($count2 + 1 < $len) && ($c == '/') && ($next_c == '*'))
+                || (($count2 + 2 == $len) && ($c == '-') && ($next_c == '-'))
+                || (($count2 + 2 < $len) && ($c == '-') && ($next_c == '-') && ((PMA_substr($sql, $count2 + 2, 1) <= ' ')))) {
                 $count2++;
                 $pos  = 0;
                 $type = 'bad';
@@ -506,7 +507,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
                 echo '</pre>';
                  */
 
-                // Nijel: Fast skip is especially needed for huge BLOB data, requires PHP at least 4.3.0:
+                // Fast skip is especially needed for huge BLOB data
                 if ($is_hex_digit) {
                     $count2++;
                     $pos = strspn($sql, '0123456789abcdefABCDEF', $count2);


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list