mirror of
https://github.com/vrana/adminer.git
synced 2025-08-17 12:00:41 +02:00
Notices: Store maria into a declared variable
This commit is contained in:
@@ -1076,7 +1076,7 @@ class Adminer {
|
||||
echo "</script>\n";
|
||||
}
|
||||
echo script("syntaxHighlighting('" . (is_object($connection) ? preg_replace('~^(\d\.?\d).*~s', '\1', $connection->server_info) : "") . "'"
|
||||
. ($connection->maria ? ", 'maria'" : ($connection->cockroach ? ", 'cockroach'" : "")) . ");"
|
||||
. ($connection->flavor == 'maria' ? ", 'maria'" : ($connection->flavor == 'cockroach' ? ", 'cockroach'" : "")) . ");"
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -187,7 +187,7 @@ if (isset($_GET["username"]) && is_string(get_password())) {
|
||||
if ($adminer->operators === null) {
|
||||
$adminer->operators = $driver->operators;
|
||||
}
|
||||
if (isset($connection->maria) || $connection->cockroach) {
|
||||
if (Driver::$jush == 'sql' || $connection->flavor == 'cockroach') {
|
||||
save_settings(array("vendor-" . DRIVER . "-" . SERVER => $drivers[DRIVER]));
|
||||
}
|
||||
}
|
||||
|
@@ -596,11 +596,11 @@ function doc_link($paths, $text = "<sup>?</sup>") {
|
||||
$urls = array(
|
||||
'sql' => "https://dev.mysql.com/doc/refman/$version/en/",
|
||||
'sqlite' => "https://www.sqlite.org/",
|
||||
'pgsql' => "https://www.postgresql.org/docs/" . ($connection->cockroach ? "current" : $version) . "/",
|
||||
'pgsql' => "https://www.postgresql.org/docs/" . ($connection->flavor == 'cockroach' ? "current" : $version) . "/",
|
||||
'mssql' => "https://learn.microsoft.com/en-us/sql/",
|
||||
'oracle' => "https://www.oracle.com/pls/topic/lookup?ctx=db" . preg_replace('~^.* (\d+)\.(\d+)\.\d+\.\d+\.\d+.*~s', '\1\2', $server_info) . "&id=",
|
||||
);
|
||||
if ($connection->maria) {
|
||||
if ($connection->flavor == 'maria') {
|
||||
$urls['sql'] = "https://mariadb.com/kb/en/";
|
||||
$paths['sql'] = (isset($paths['mariadb']) ? $paths['mariadb'] : str_replace(".html", "/", $paths['sql']));
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@ namespace Adminer;
|
||||
// PDO can be used in several database drivers
|
||||
if (extension_loaded('pdo')) {
|
||||
abstract class PdoDb {
|
||||
public $server_info, $affected_rows, $errno, $error;
|
||||
public $flavor = '', $server_info, $affected_rows, $errno, $error;
|
||||
protected $pdo;
|
||||
private $result;
|
||||
|
||||
|
Reference in New Issue
Block a user