From a5780e58afedf5794d45463aad9c3434890fae34 Mon Sep 17 00:00:00 2001 From: Peter Knut Date: Sat, 16 Mar 2024 18:17:06 +0100 Subject: [PATCH] Move dependencies from submodules to Composer --- .gitmodules | 6 ------ adminer/file.inc.php | 4 ++-- compile.php | 2 +- composer.json | 16 ++++++++++++++-- externals/JsShrink | 1 - externals/jush | 1 - 6 files changed, 17 insertions(+), 13 deletions(-) delete mode 160000 externals/JsShrink delete mode 160000 externals/jush diff --git a/.gitmodules b/.gitmodules index 7688bddb..8f29d8b8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,3 @@ -[submodule "jush"] - path = externals/jush - url = https://github.com/vrana/jush -[submodule "JsShrink"] - path = externals/JsShrink - url = https://github.com/vrana/JsShrink [submodule "designs/hydra"] path = designs/hydra url = https://github.com/Niyko/Hydra-Dark-Theme-for-Adminer diff --git a/adminer/file.inc.php b/adminer/file.inc.php index 8c817697..7e5a6172 100644 --- a/adminer/file.inc.php +++ b/adminer/file.inc.php @@ -6,13 +6,13 @@ if ($_GET["file"] == "favicon.ico") { echo lzw_decompress(compile_file('../adminer/static/favicon.ico', 'lzw_compress')); } elseif ($_GET["file"] == "default.css") { header("Content-Type: text/css; charset=utf-8"); - echo lzw_decompress(compile_file('../adminer/static/default.css;../externals/jush/jush.css', 'minify_css')); + echo lzw_decompress(compile_file('../adminer/static/default.css;../vendor/vrana/jush/jush.css', 'minify_css')); } elseif ($_GET["file"] == "functions.js") { header("Content-Type: text/javascript; charset=utf-8"); echo lzw_decompress(compile_file('../adminer/static/functions.js;static/editing.js', 'minify_js')); } elseif ($_GET["file"] == "jush.js") { header("Content-Type: text/javascript; charset=utf-8"); - echo lzw_decompress(compile_file('../externals/jush/modules/jush.js;../externals/jush/modules/jush-textarea.js;../externals/jush/modules/jush-txt.js;../externals/jush/modules/jush-js.js;../externals/jush/modules/jush-sql.js;../externals/jush/modules/jush-pgsql.js;../externals/jush/modules/jush-sqlite.js;../externals/jush/modules/jush-mssql.js;../externals/jush/modules/jush-oracle.js;../externals/jush/modules/jush-simpledb.js', 'minify_js')); + echo lzw_decompress(compile_file('../vendor/vrana/jush/modules/jush.js;../vendor/vrana/jush/modules/jush-textarea.js;../vendor/vrana/jush/modules/jush-txt.js;../vendor/vrana/jush/modules/jush-js.js;../vendor/vrana/jush/modules/jush-sql.js;../vendor/vrana/jush/modules/jush-pgsql.js;../vendor/vrana/jush/modules/jush-sqlite.js;../vendor/vrana/jush/modules/jush-mssql.js;../vendor/vrana/jush/modules/jush-oracle.js;../vendor/vrana/jush/modules/jush-simpledb.js', 'minify_js')); } else { header("Content-Type: image/gif"); switch ($_GET["file"]) { diff --git a/compile.php b/compile.php index 73f2edb5..7a1b6e5e 100755 --- a/compile.php +++ b/compile.php @@ -7,7 +7,7 @@ function adminer_errors($errno, $errstr) { error_reporting(6135); // errors and warnings set_error_handler('adminer_errors', E_WARNING); include dirname(__FILE__) . "/adminer/include/version.inc.php"; -include dirname(__FILE__) . "/externals/JsShrink/jsShrink.php"; +include dirname(__FILE__) . "/vendor/vrana/jsshrink/jsShrink.php"; function add_apo_slashes($s) { return addcslashes($s, "\\'"); diff --git a/composer.json b/composer.json index a6fcfbdc..0d3e9dce 100644 --- a/composer.json +++ b/composer.json @@ -28,9 +28,21 @@ "require": { "php": ">=5.6", "ext-pdo": "*", - "ext-json": "*" + "ext-json": "*", + "vrana/jush": "@dev", + "vrana/jsshrink": "@dev" }, "scripts": { "compile": "php compile.php" - } + }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/vrana/jush.git" + }, + { + "type": "vcs", + "url": "https://github.com/vrana/jsshrink.git" + } + ] } diff --git a/externals/JsShrink b/externals/JsShrink deleted file mode 160000 index 17cbfaca..00000000 --- a/externals/JsShrink +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 17cbfacae67dede6d94d94ce92214c8ca31d858e diff --git a/externals/jush b/externals/jush deleted file mode 160000 index ae33623c..00000000 --- a/externals/jush +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ae33623c66189375a3654954cddc1c73f65c36fa