Fix Adminer for PHP 8.0/8.1

This commit is contained in:
cytopia 2020-11-08 15:42:43 +01:00
parent 2d5361891e
commit 4acfa94639
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2
5 changed files with 2047 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@ -417,8 +417,10 @@ HTML;
if ($el['path'] == '__ADMINER__') {
if (version_compare(loadClass('Php')->getVersion(), '5.4', '<')) {
$el['path'] = '/vendor/adminer-4.6.3-en.php';
} else {
} elseif (version_compare(loadClass('Php')->getVersion(), '8.0', '<')){
$el['path'] = '/vendor/adminer-4.7.7-en.php';
} else {
$el['path'] = '/vendor/adminer-4.7.7-en-php8.php';
}
}

View File

@ -13,7 +13,7 @@ DVLBOX_PATH="$( cd "${SCRIPT_PATH}/../.." && pwd -P )"
. "${SCRIPT_PATH}/../scripts/.lib.sh"
RETRIES=10
DISABLED_VERSIONS=("8.0" "8.1")
DISABLED_VERSIONS=()
echo
@ -52,7 +52,7 @@ if ! URL="$( run "\
curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/index.php' \
| tac \
| tac \
| grep -Eo '/vendor/adminer-[.0-9]+-en\\.php'" \
| grep -Eo '/vendor/adminer-[.0-9]+-en(-php8)?\\.php'" \
"${RETRIES}" "" "0" )"; then
printf "\\r[FAILED] Retrieve Adminer URL\\n"
run "curl -sS 'http://localhost:${HOST_PORT_HTTPD}/index.php' || true"

View File

@ -13,7 +13,7 @@ DVLBOX_PATH="$( cd "${SCRIPT_PATH}/../.." && pwd -P )"
. "${SCRIPT_PATH}/../scripts/.lib.sh"
RETRIES=10
DISABLED_VERSIONS=("8.0" "8.1")
DISABLED_VERSIONS=()
echo
@ -52,7 +52,7 @@ if ! URL="$( run "\
curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/index.php' \
| tac \
| tac \
| grep -Eo '/vendor/adminer-[.0-9]+-en\\.php'" \
| grep -Eo '/vendor/adminer-[.0-9]+-en(-php8)?\\.php'" \
"${RETRIES}" "" "0" )"; then
printf "\\r[FAILED] Retrieve Adminer URL\\n"
run "curl -sS 'http://localhost:${HOST_PORT_HTTPD}/index.php' || true"

View File

@ -13,7 +13,7 @@ DVLBOX_PATH="$( cd "${SCRIPT_PATH}/../.." && pwd -P )"
. "${SCRIPT_PATH}/../scripts/.lib.sh"
RETRIES=10
DISABLED_VERSIONS=("8.0" "8.1")
DISABLED_VERSIONS=()
echo
@ -52,7 +52,7 @@ if ! URL="$( run "\
curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/index.php' \
| tac \
| tac \
| grep -Eo '/vendor/adminer-[.0-9]+-en\\.php'" \
| grep -Eo '/vendor/adminer-[.0-9]+-en(-php8)?\\.php'" \
"${RETRIES}" "" "0" )"; then
printf "\\r[FAILED] Retrieve Adminer URL\\n"
run "curl -sS 'http://localhost:${HOST_PORT_HTTPD}/index.php' || true"