mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 15:47:00 +02:00
Rename Min_ classes
This commit is contained in:
@@ -6,7 +6,7 @@ add_driver("clickhouse", "ClickHouse (alpha)");
|
||||
if (isset($_GET["clickhouse"])) {
|
||||
define("DRIVER", "clickhouse");
|
||||
|
||||
class Min_DB {
|
||||
class Db {
|
||||
var $extension = "JSON", $server_info, $errno, $_result, $error, $_url;
|
||||
var $_db = 'default';
|
||||
|
||||
@@ -43,7 +43,7 @@ if (isset($_GET["clickhouse"])) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return new Min_Result($return);
|
||||
return new Result($return);
|
||||
}
|
||||
|
||||
function isQuerySelectLike($query) {
|
||||
@@ -88,7 +88,7 @@ if (isset($_GET["clickhouse"])) {
|
||||
}
|
||||
}
|
||||
|
||||
class Min_Result {
|
||||
class Result {
|
||||
var $num_rows, $_rows, $columns, $meta, $_offset = 0;
|
||||
|
||||
function __construct($result) {
|
||||
@@ -130,7 +130,7 @@ if (isset($_GET["clickhouse"])) {
|
||||
}
|
||||
|
||||
|
||||
class Min_Driver extends Min_SQL {
|
||||
class Driver extends SqlDriver {
|
||||
function delete($table, $queryWhere, $limit = 0) {
|
||||
if ($queryWhere === '') {
|
||||
$queryWhere = 'WHERE 1=1';
|
||||
@@ -219,7 +219,7 @@ if (isset($_GET["clickhouse"])) {
|
||||
|
||||
function connect() {
|
||||
$adminer = adminer();
|
||||
$connection = new Min_DB;
|
||||
$connection = new Db;
|
||||
list($server, $username, $password) = $adminer->credentials();
|
||||
if (!preg_match('~^(https?://)?[-a-z\d.]+(:\d+)?$~', $server)) {
|
||||
return lang('Invalid server.');
|
||||
|
@@ -9,7 +9,7 @@ if (isset($_GET["elastic"])) {
|
||||
if (ini_bool('allow_url_fopen')) {
|
||||
define("ELASTIC_DB_NAME", "elastic");
|
||||
|
||||
class Min_DB {
|
||||
class Db {
|
||||
var $extension = "JSON", $server_info, $errno, $error, $_url;
|
||||
|
||||
/**
|
||||
@@ -96,7 +96,7 @@ if (isset($_GET["elastic"])) {
|
||||
}
|
||||
}
|
||||
|
||||
class Min_Result {
|
||||
class Result {
|
||||
var $num_rows, $_rows;
|
||||
|
||||
function __construct($rows) {
|
||||
@@ -121,7 +121,7 @@ if (isset($_GET["elastic"])) {
|
||||
}
|
||||
}
|
||||
|
||||
class Min_Driver extends Min_SQL {
|
||||
class Driver extends SqlDriver {
|
||||
|
||||
function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) {
|
||||
$data = array();
|
||||
@@ -216,7 +216,7 @@ if (isset($_GET["elastic"])) {
|
||||
$return[] = $row;
|
||||
}
|
||||
|
||||
return new Min_Result($return);
|
||||
return new Result($return);
|
||||
}
|
||||
|
||||
function update($type, $record, $queryWhere, $limit = 0, $separator = "\n") {
|
||||
@@ -275,7 +275,7 @@ if (isset($_GET["elastic"])) {
|
||||
}
|
||||
|
||||
function connect() {
|
||||
$connection = new Min_DB;
|
||||
$connection = new Db;
|
||||
|
||||
list($server, $username, $password) = adminer()->credentials();
|
||||
if (!preg_match('~^(https?://)?[-a-z\d.]+(:\d+)?$~', $server)) {
|
||||
|
@@ -7,7 +7,7 @@ if (isset($_GET["elastic5"])) {
|
||||
define("DRIVER", "elastic5");
|
||||
|
||||
if (ini_bool('allow_url_fopen')) {
|
||||
class Min_DB {
|
||||
class Db {
|
||||
var $extension = "JSON", $server_info, $errno, $error, $_url, $_db;
|
||||
|
||||
/** Performs query
|
||||
@@ -87,7 +87,7 @@ if (isset($_GET["elastic5"])) {
|
||||
}
|
||||
}
|
||||
|
||||
class Min_Result {
|
||||
class Result {
|
||||
var $num_rows, $_rows;
|
||||
|
||||
function __construct($rows) {
|
||||
@@ -112,7 +112,7 @@ if (isset($_GET["elastic5"])) {
|
||||
}
|
||||
}
|
||||
|
||||
class Min_Driver extends Min_SQL {
|
||||
class Driver extends SqlDriver {
|
||||
|
||||
function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) {
|
||||
$data = array();
|
||||
@@ -200,7 +200,7 @@ if (isset($_GET["elastic5"])) {
|
||||
$return[] = $row;
|
||||
}
|
||||
|
||||
return new Min_Result($return);
|
||||
return new Result($return);
|
||||
}
|
||||
|
||||
function update($type, $record, $queryWhere, $limit = 0, $separator = "\n") {
|
||||
@@ -259,7 +259,7 @@ if (isset($_GET["elastic5"])) {
|
||||
}
|
||||
|
||||
function connect() {
|
||||
$connection = new Min_DB;
|
||||
$connection = new Db;
|
||||
|
||||
list($server, $username, $password) = adminer()->credentials();
|
||||
if (!preg_match('~^(https?://)?[-a-z\d.]+(:\d+)?$~', $server)) {
|
||||
|
@@ -11,7 +11,7 @@ if (isset($_GET["firebird"])) {
|
||||
define("DRIVER", "firebird");
|
||||
|
||||
if (extension_loaded("interbase")) {
|
||||
class Min_DB {
|
||||
class Db {
|
||||
var
|
||||
$extension = "Firebird",
|
||||
$server_info,
|
||||
@@ -54,7 +54,7 @@ if (isset($_GET["firebird"])) {
|
||||
$this->affected_rows = ibase_affected_rows($this->_link);
|
||||
return true;
|
||||
}
|
||||
return new Min_Result($result);
|
||||
return new Result($result);
|
||||
}
|
||||
|
||||
function multi_query($query) {
|
||||
@@ -79,7 +79,7 @@ if (isset($_GET["firebird"])) {
|
||||
}
|
||||
}
|
||||
|
||||
class Min_Result {
|
||||
class Result {
|
||||
var $num_rows, $_result, $_offset = 0;
|
||||
|
||||
function __construct($result) {
|
||||
@@ -114,7 +114,7 @@ if (isset($_GET["firebird"])) {
|
||||
|
||||
|
||||
|
||||
class Min_Driver extends Min_SQL {
|
||||
class Driver extends SqlDriver {
|
||||
}
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ if (isset($_GET["firebird"])) {
|
||||
|
||||
function connect() {
|
||||
$adminer = adminer();
|
||||
$connection = new Min_DB;
|
||||
$connection = new Db;
|
||||
$credentials = $adminer->credentials();
|
||||
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
|
||||
return $connection;
|
||||
|
@@ -7,7 +7,7 @@ if (isset($_GET["simpledb"])) {
|
||||
define("DRIVER", "simpledb");
|
||||
|
||||
if (class_exists('SimpleXMLElement') && ini_bool('allow_url_fopen')) {
|
||||
class Min_DB {
|
||||
class Db {
|
||||
var $extension = "SimpleXML", $server_info = '2009-04-15', $error, $timeout, $next, $affected_rows, $_result;
|
||||
|
||||
function select_db($database) {
|
||||
@@ -34,7 +34,7 @@ if (isset($_GET["simpledb"])) {
|
||||
'Value' => $sum,
|
||||
))));
|
||||
}
|
||||
return new Min_Result($result);
|
||||
return new Result($result);
|
||||
}
|
||||
|
||||
function multi_query($query) {
|
||||
@@ -55,7 +55,7 @@ if (isset($_GET["simpledb"])) {
|
||||
|
||||
}
|
||||
|
||||
class Min_Result {
|
||||
class Result {
|
||||
var $num_rows, $_rows = array(), $_offset = 0;
|
||||
|
||||
function __construct($result) {
|
||||
@@ -119,7 +119,7 @@ if (isset($_GET["simpledb"])) {
|
||||
|
||||
|
||||
|
||||
class Min_Driver extends Min_SQL {
|
||||
class Driver extends SqlDriver {
|
||||
public $primary = "itemName()";
|
||||
|
||||
function _chunkRequest($ids, $action, $params, $expand = array()) {
|
||||
@@ -257,7 +257,7 @@ if (isset($_GET["simpledb"])) {
|
||||
if ($password != "") {
|
||||
return lang('Database does not support password.');
|
||||
}
|
||||
return new Min_DB;
|
||||
return new Db;
|
||||
}
|
||||
|
||||
function support($feature) {
|
||||
|
Reference in New Issue
Block a user