1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-18 20:31:19 +02:00

Rename Min_ classes

This commit is contained in:
Jakub Vrana
2025-03-05 14:12:42 +01:00
parent 45ac930e06
commit 3da09dd31a
18 changed files with 89 additions and 90 deletions

View File

@@ -146,7 +146,7 @@ function auth_error($error) {
exit;
}
if (isset($_GET["username"]) && !class_exists('Adminer\Min_DB')) {
if (isset($_GET["username"]) && !class_exists('Adminer\Db')) {
unset($_SESSION["pwds"][DRIVER]);
unset_permanent();
page_header(lang('No extension'), lang('None of the supported PHP extensions (%s) are available.', implode(", ", $possible_drivers)), false);
@@ -163,7 +163,7 @@ if (isset($_GET["username"]) && is_string(get_password())) {
}
check_invalid_login();
$connection = connect();
$driver = new Min_Driver($connection);
$driver = new Driver($connection);
}
$login = null;

View File

@@ -22,11 +22,11 @@ function get_driver($id) {
return $drivers[$id];
}
/*abstract*/ class Min_SQL {
/*abstract*/ class SqlDriver {
var $_conn;
/** Create object for performing database operations
* @param Min_DB
* @param Db
*/
function __construct($connection) {
$this->_conn = $connection;
@@ -41,7 +41,7 @@ function get_driver($id) {
* @param int result of $adminer->selectLimitProcess()
* @param int index of page starting at zero
* @param bool whether to print the query
* @return Min_Result
* @return Result
*/
function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) {
global $adminer, $jush;

View File

@@ -4,8 +4,8 @@ namespace Adminer;
// This file is not used in Adminer Editor.
/** Print select result
* @param Min_Result
* @param Min_DB connection to examine indexes
* @param Result
* @param Db connection to examine indexes
* @param array
* @param int
* @return array $orgtables

View File

@@ -4,7 +4,7 @@ namespace Adminer;
// This file is used both in Adminer and Adminer Editor.
/** Get database connection
* @return Min_DB
* @return Db
*/
function connection() {
// can be used in customization, $connection is minified
@@ -98,7 +98,7 @@ function bracket_escape($idf, $back = false) {
/** Check if connection has at least the given version
* @param string required version
* @param string required MariaDB version
* @param Min_DB defaults to $connection
* @param Db defaults to $connection
* @return bool
*/
function min_version($version, $maria_db = "", $connection2 = null) {
@@ -115,7 +115,7 @@ function min_version($version, $maria_db = "", $connection2 = null) {
}
/** Get connection charset
* @param Min_DB
* @param Db
* @return string
*/
function charset($connection) {
@@ -356,7 +356,7 @@ function get_vals($query, $column = 0) {
/** Get keys from first column and values from second
* @param string
* @param Min_DB
* @param Db
* @param bool
* @return array
*/
@@ -381,7 +381,7 @@ function get_key_vals($query, $connection2 = null, $set_keys = true) {
/** Get all rows of result
* @param string
* @param Min_DB
* @param Db
* @param string
* @return array of associative arrays
*/
@@ -637,7 +637,7 @@ function query_redirect($query, $location, $message, $redirect = true, $execute
/** Execute and remember query
* @param string or null to return remembered queries, end with ';' to use DELIMITER
* @return Min_Result or [$queries, $time] if $query = null
* @return Result or [$queries, $time] if $query = null
*/
function queries($query) {
global $connection;

View File

@@ -3,7 +3,7 @@ namespace Adminer;
// PDO can be used in several database drivers
if (extension_loaded('pdo')) {
/*abstract*/ class Min_PDO {
/*abstract*/ class PdoDb {
var $_result, $server_info, $affected_rows, $errno, $error, $pdo;
function __construct() {
@@ -16,7 +16,7 @@ if (extension_loaded('pdo')) {
function dsn($dsn, $username, $password, $options = array()) {
$options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_SILENT;
$options[PDO::ATTR_STATEMENT_CLASS] = array('Min_PDOStatement');
$options[PDO::ATTR_STATEMENT_CLASS] = array('PdoDbStatement');
try {
$this->pdo = new PDO($dsn, $username, $password, $options);
} catch (Exception $ex) {
@@ -82,7 +82,7 @@ if (extension_loaded('pdo')) {
}
}
class Min_PDOStatement extends \PDOStatement {
class PdoDbStatement extends \PDOStatement {
var $_offset = 0, $num_rows;
function fetch_assoc() {