1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-07 07:06:45 +02:00

Compile: Fix shortening in private methods

This commit is contained in:
Jakub Vrana
2025-03-11 13:50:23 +01:00
parent 5a4c4dd892
commit 2e5027a1aa
3 changed files with 7 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
<?php
namespace Adminer;
$VERSION = "5.0.3";
$VERSION = "5.0.4-dev";

View 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

View File

@@ -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);