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

Move constants to namespace

This commit is contained in:
Jakub Vrana
2025-03-06 17:34:21 +01:00
parent 5a84ff7647
commit 0541680d73
21 changed files with 31 additions and 40 deletions

View File

@@ -80,10 +80,10 @@ include "../adminer/drivers/mysql.inc.php"; // must be included as last driver
$jush = Driver::$jush;
define("SERVER", $_GET[DRIVER]); // read from pgsql=localhost
define("DB", $_GET["db"]); // for the sake of speed and size
define('Adminer\SERVER', $_GET[DRIVER]); // read from pgsql=localhost
define('Adminer\DB', $_GET["db"]); // for the sake of speed and size
define(
"ME",
'Adminer\ME',
preg_replace('~\?.*~', '', relative_uri()) . '?'
. (sid() ? SID . '&' : '')
. (SERVER !== null ? DRIVER . "=" . urlencode(SERVER) . '&' : '')

View File

@@ -109,7 +109,7 @@ var thousandsSeparator = '<?php echo js_escape(lang(',')); ?>';
$databases = null;
}
stop_session();
define("PAGE_HEADER", 1);
define('Adminer\PAGE_HEADER', 1);
}
/** Send HTTP headers

View File

@@ -394,7 +394,7 @@ function get_rows($query, $connection2 = null, $error = "<p class='error'>") {
while ($row = $result->fetch_assoc()) {
$return[] = $row;
}
} elseif (!$result && !is_object($connection2) && $error && (defined("PAGE_HEADER") || $error == "-- ")) {
} elseif (!$result && !is_object($connection2) && $error && (defined('Adminer\PAGE_HEADER') || $error == "-- ")) {
echo $error . error() . "\n";
}
return $return;