]> git.joonet.de Git - adminer.git/commitdiff
Compile: Fix shortening in private methods
authorJakub Vrana <jakub@vrana.cz>
Tue, 11 Mar 2025 12:50:23 +0000 (13:50 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 11 Mar 2025 12:50:36 +0000 (13:50 +0100)
adminer/include/version.inc.php
changes.txt
compile.php

index babfbe1cc488feb83fdd1a5323a1c87b57605e80..1f3be8e7bdee1367fd5718d16c396266ce77e3b6 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 namespace Adminer;
 
-$VERSION = "5.0.3";
+$VERSION = "5.0.4-dev";
index ac70e51e4c29ff0e8e95be157423a9e3373b0f09..6f8b790d996273845a8d722a6286987f8e9d470e 100644 (file)
@@ -1,3 +1,6 @@
+Adminer dev:
+Compile: Fix shortening in private methods (regression from 5.0.3)
+
 Adminer 5.0.3 (released 2025-03-11):
 Fix gzip export (bug #896, regression from 5.0.0)
 Fix importing multiple SQL files not terminated by semicolon
index 78055a772439708d0a599aafb929de26fbb55be2..cce07cbbf89fc86e1bb748d411de469a9e12c14b 100755 (executable)
@@ -297,8 +297,8 @@ function php_shrink($input) {
                                $doc_comment = true;
                                $token[1] = substr_replace($token[1], "* @version $VERSION\n", -2, 0);
                        }
-                       if ($token[0] == T_VAR || $token[0] == T_PUBLIC || $token[0] == T_PROTECTED || $token[0] == T_PRIVATE) {
-                               if ($token[0] == T_PUBLIC && $tokens[$i+2][1][0] == '$') {
+                       if ($token[0] == T_VAR || $token[0] == T_PUBLIC || $token[0] == T_PROTECTED || $token[0] == T_PRIVATE && $tokens[$i+2][1][0] == '$') {
+                               if ($token[0] == T_PUBLIC) {
                                        $token[1] = 'var';
                                }
                                $shortening = false;
@@ -446,7 +446,7 @@ if ($driver) {
        }
        if (count($drivers) == 1) {
                $file = str_replace('html_select("auth[driver]", $drivers, DRIVER, "loginDriver(this);")', "\"<input type='hidden' name='auth[driver]' value='" . ($driver == "mysql" ? "server" : $driver) . "'>" . reset($drivers) . "\"", $file, $count);
-               if (!$count) {
+               if (!$count && $project != "editor") {
                        echo "auth[driver] form field not found\n";
                }
                $file = str_replace(" . script(\"qs('#username').form['auth[driver]'].onchange();\")", "", $file);