mirror of
https://github.com/vrana/adminer.git
synced 2025-08-16 11:34:10 +02:00
Move $VERSION and version() to VERSION
This commit is contained in:
@@ -946,10 +946,10 @@ class Adminer {
|
||||
* @param string $missing can be "auth" if there is no database connection, "db" if there is no database selected, "ns" with invalid schema
|
||||
*/
|
||||
function navigation(string $missing): void {
|
||||
global $VERSION, $drivers, $connection, $adminer;
|
||||
echo "<h1>" . $adminer->name() . " <span class='version'>$VERSION";
|
||||
global $drivers, $connection, $adminer;
|
||||
echo "<h1>" . $adminer->name() . " <span class='version'>" . VERSION;
|
||||
$new_version = $_COOKIE["adminer_version"];
|
||||
echo " <a href='https://www.adminer.org/#download'" . target_blank() . " id='version'>" . (version_compare($VERSION, $new_version) < 0 ? h($new_version) : "") . "</a>";
|
||||
echo " <a href='https://www.adminer.org/#download'" . target_blank() . " id='version'>" . (version_compare(VERSION, $new_version) < 0 ? h($new_version) : "") . "</a>";
|
||||
echo "</span></h1>\n";
|
||||
// this is matched by compile.php
|
||||
switch_lang();
|
||||
|
@@ -39,7 +39,7 @@ if ($_GET["script"] == "version") {
|
||||
exit;
|
||||
}
|
||||
|
||||
global $adminer, $connection, $driver, $drivers, $error, $HTTPS, $LANG, $langs, $permanent, $has_token, $token, $translations, $VERSION; // allows including Adminer inside a function
|
||||
global $adminer, $connection, $driver, $drivers, $error, $HTTPS, $LANG, $langs, $permanent, $has_token, $token, $translations; // allows including Adminer inside a function
|
||||
|
||||
if (!$_SERVER["REQUEST_URI"]) { // IIS 5 compatibility
|
||||
$_SERVER["REQUEST_URI"] = $_SERVER["ORIG_PATH_INFO"];
|
||||
|
@@ -7,7 +7,7 @@ namespace Adminer;
|
||||
* @param string $title2 used after colon in title and heading, should be HTML escaped
|
||||
*/
|
||||
function page_header(string $title, string $error = "", $breadcrumb = array(), string $title2 = ""): void {
|
||||
global $LANG, $VERSION, $adminer, $drivers;
|
||||
global $LANG, $adminer, $drivers;
|
||||
page_headers();
|
||||
if (is_ajax() && $error) {
|
||||
page_messages($error);
|
||||
@@ -77,7 +77,7 @@ fQIDAQAB
|
||||
}
|
||||
}
|
||||
echo script("mixin(document.body, {onkeydown: bodyKeydown, onclick: bodyClick"
|
||||
. (isset($_COOKIE["adminer_version"]) ? "" : ", onload: partial(verifyVersion, '$VERSION', '" . js_escape(ME) . "', '" . get_token() . "')") // $token may be empty in auth.inc.php
|
||||
. (isset($_COOKIE["adminer_version"]) ? "" : ", onload: partial(verifyVersion, '" . VERSION . "', '" . js_escape(ME) . "', '" . get_token() . "')") // $token may be empty in auth.inc.php
|
||||
. "});
|
||||
document.body.classList.replace('nojs', 'js');
|
||||
const offlineMessage = '" . js_escape(lang('You are offline.')) . "';
|
||||
|
@@ -26,12 +26,6 @@ function driver() {
|
||||
return $driver;
|
||||
}
|
||||
|
||||
/** Get Adminer version */
|
||||
function version(): string {
|
||||
global $VERSION;
|
||||
return $VERSION;
|
||||
}
|
||||
|
||||
/** Unescape database identifier
|
||||
* @param string $idf text inside ``
|
||||
*/
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
namespace Adminer;
|
||||
|
||||
$VERSION = "5.1.1-dev";
|
||||
const VERSION = "5.1.1-dev";
|
||||
|
Reference in New Issue
Block a user