mirror of
https://github.com/vrana/adminer.git
synced 2025-08-30 09:39:51 +02:00
Fix linking external dependencies
This commit is contained in:
@@ -96,7 +96,7 @@ class Adminer {
|
|||||||
*/
|
*/
|
||||||
function head() {
|
function head() {
|
||||||
?>
|
?>
|
||||||
<link rel="stylesheet" type="text/css" href="../externals/jush/jush.css">
|
<link rel="stylesheet" type="text/css" href="../vendor/vrana/jush/jush.css">
|
||||||
<?php
|
<?php
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -963,12 +963,12 @@ class Adminer {
|
|||||||
$connection->select_db(DB);
|
$connection->select_db(DB);
|
||||||
$tables = table_status('', true);
|
$tables = table_status('', true);
|
||||||
}
|
}
|
||||||
echo script_src("../externals/jush/modules/jush.js");
|
echo script_src("../vendor/vrana/jush/modules/jush.js");
|
||||||
echo script_src("../externals/jush/modules/jush-textarea.js");
|
echo script_src("../vendor/vrana/jush/modules/jush-textarea.js");
|
||||||
echo script_src("../externals/jush/modules/jush-txt.js");
|
echo script_src("../vendor/vrana/jush/modules/jush-txt.js");
|
||||||
echo script_src("../externals/jush/modules/jush-js.js");
|
echo script_src("../vendor/vrana/jush/modules/jush-js.js");
|
||||||
if (support("sql")) {
|
if (support("sql")) {
|
||||||
echo script_src("../externals/jush/modules/jush-$jush.js");
|
echo script_src("../vendor/vrana/jush/modules/jush-$jush.js");
|
||||||
?>
|
?>
|
||||||
<script<?php echo nonce(); ?>>
|
<script<?php echo nonce(); ?>>
|
||||||
<?php
|
<?php
|
||||||
|
@@ -418,7 +418,7 @@ if ($driver) {
|
|||||||
if (count($drivers) == 1) {
|
if (count($drivers) == 1) {
|
||||||
$file = str_replace('<?php echo html_select("auth[driver]", $drivers, DRIVER) . "\n"; ?>', "<input type='hidden' name='auth[driver]' value='" . ($driver == "mysql" ? "server" : $driver) . "'>" . reset($drivers), $file);
|
$file = str_replace('<?php echo html_select("auth[driver]", $drivers, DRIVER) . "\n"; ?>', "<input type='hidden' name='auth[driver]' value='" . ($driver == "mysql" ? "server" : $driver) . "'>" . reset($drivers), $file);
|
||||||
}
|
}
|
||||||
$file = preg_replace('(;../externals/jush/modules/jush-(?!textarea\.|txt\.|js\.|' . preg_quote($driver == "mysql" ? "sql" : $driver) . '\.)[^.]+.js)', '', $file);
|
$file = preg_replace('(;../vendor/vrana/jush/modules/jush-(?!textarea\.|txt\.|js\.|' . preg_quote($driver == "mysql" ? "sql" : $driver) . '\.)[^.]+.js)', '', $file);
|
||||||
$file = preg_replace_callback('~doc_link\(array\((.*)\)\)~sU', function ($match) use ($driver) {
|
$file = preg_replace_callback('~doc_link\(array\((.*)\)\)~sU', function ($match) use ($driver) {
|
||||||
list(, $links) = $match;
|
list(, $links) = $match;
|
||||||
$links = preg_replace("~'(?!(" . ($driver == "mysql" ? "sql|mariadb" : $driver) . ")')[^']*' => [^,]*,?~", '', $links);
|
$links = preg_replace("~'(?!(" . ($driver == "mysql" ? "sql|mariadb" : $driver) . ")')[^']*' => [^,]*,?~", '', $links);
|
||||||
@@ -441,7 +441,7 @@ if ($_SESSION["lang"]) {
|
|||||||
}
|
}
|
||||||
$file = str_replace('<?php echo script_src("static/editing.js"); ?>' . "\n", "", $file);
|
$file = str_replace('<?php echo script_src("static/editing.js"); ?>' . "\n", "", $file);
|
||||||
$file = preg_replace('~\s+echo script_src\("\.\./externals/jush/modules/jush-(textarea|txt|js|\$jush)\.js"\);~', '', $file);
|
$file = preg_replace('~\s+echo script_src\("\.\./externals/jush/modules/jush-(textarea|txt|js|\$jush)\.js"\);~', '', $file);
|
||||||
$file = str_replace('<link rel="stylesheet" type="text/css" href="../externals/jush/jush.css">' . "\n", "", $file);
|
$file = str_replace('<link rel="stylesheet" type="text/css" href="../vendor/vrana/jush/jush.css">' . "\n", "", $file);
|
||||||
$file = preg_replace_callback("~compile_file\\('([^']+)'(?:, '([^']*)')?\\)~", 'compile_file', $file); // integrate static files
|
$file = preg_replace_callback("~compile_file\\('([^']+)'(?:, '([^']*)')?\\)~", 'compile_file', $file); // integrate static files
|
||||||
$replace = 'preg_replace("~\\\\\\\\?.*~", "", ME) . "?file=\1&version=' . $VERSION . '"';
|
$replace = 'preg_replace("~\\\\\\\\?.*~", "", ME) . "?file=\1&version=' . $VERSION . '"';
|
||||||
$file = preg_replace('~\.\./adminer/static/(default\.css|favicon\.ico)~', '<?php echo h(' . $replace . '); ?>', $file);
|
$file = preg_replace('~\.\./adminer/static/(default\.css|favicon\.ico)~', '<?php echo h(' . $replace . '); ?>', $file);
|
||||||
|
Reference in New Issue
Block a user