1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-30 01:30:12 +02:00

Add script for exporting compiled adminer variants

This commit is contained in:
Peter Knut
2024-08-20 22:27:00 +02:00
parent b94636f8a7
commit 8a60243459
4 changed files with 28 additions and 1 deletions

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@
/editor*.php
/vendor/
/composer.lock
/temp

24
bin/export.sh Normal file
View File

@@ -0,0 +1,24 @@
#!/bin/sh
set -e
# Root directory.
BASEDIR=$( cd `dirname $0`/.. ; pwd )
cd "$BASEDIR"
php compile.php
php compile.php en
php compile.php de
php compile.php cs
php compile.php sk
php compile.php mysql
php compile.php mysql en
php compile.php mysql de
php compile.php mysql cs
php compile.php mysql sk
php compile.php editor
php compile.php editor en
php compile.php editor mysql
php compile.php editor mysql en

View File

@@ -11,6 +11,7 @@ Adminer 4.9.0-dev:
- Fix several bugs and security issues in AdminerFileUpload plugin.
- Skip dump of generated columns.
- Update composer.json.
- Add script for exporting compiled adminer variants.
Adminer 4.8.2 (released 2024-03-16):
Support multi-line table comments

View File

@@ -451,6 +451,7 @@ $file = preg_replace('~"\.\./externals/jush/modules/(jush\.js)"~', $replace, $fi
$file = preg_replace("~<\\?php\\s*\\?>\n?|\\?>\n?<\\?php~", '', $file);
$file = php_shrink($file);
$filename = $project . (preg_match('~-dev$~', $VERSION) ? "" : "-$VERSION") . ($driver ? "-$driver" : "") . ($_SESSION["lang"] ? "-$_SESSION[lang]" : "") . ".php";
@mkdir("temp/export", 0777, true);
$filename = "temp/export/$project" . (preg_match('~-dev$~', $VERSION) ? "" : "-$VERSION") . ($driver ? "-$driver" : "") . ($_SESSION["lang"] ? "-$_SESSION[lang]" : "") . ".php";
file_put_contents($filename, $file);
echo "$filename created (" . strlen($file) . " B).\n";