diff --git a/adminer/drivers/elastic.inc.php b/adminer/drivers/elastic.inc.php index 2028ba3a..4ab29c22 100644 --- a/adminer/drivers/elastic.inc.php +++ b/adminer/drivers/elastic.inc.php @@ -81,7 +81,7 @@ if (isset($_GET["elastic"])) { class Min_Result { var $num_rows, $_rows; - function Min_Result($rows) { + function __construct($rows) { $this->num_rows = count($this->_rows); $this->_rows = $rows; reset($this->_rows); diff --git a/adminer/drivers/firebird.inc.php b/adminer/drivers/firebird.inc.php index 696ecff8..68f98320 100644 --- a/adminer/drivers/firebird.inc.php +++ b/adminer/drivers/firebird.inc.php @@ -81,7 +81,7 @@ if (isset($_GET["firebird"])) { class Min_Result { var $num_rows, $_result, $_offset = 0; - function Min_Result($result) { + function __construct($result) { $this->_result = $result; // $this->num_rows = ibase_num_rows($result); } diff --git a/adminer/drivers/mongo.inc.php b/adminer/drivers/mongo.inc.php index 2f152c29..f05ba571 100644 --- a/adminer/drivers/mongo.inc.php +++ b/adminer/drivers/mongo.inc.php @@ -52,7 +52,7 @@ if (isset($_GET["mongo"])) { class Min_Result { var $num_rows, $_rows = array(), $_offset = 0, $_charset = array(); - function Min_Result($result) { + function __construct($result) { foreach ($result as $item) { $row = array(); foreach ($item as $key => $val) { diff --git a/adminer/drivers/mssql.inc.php b/adminer/drivers/mssql.inc.php index 8a8f6206..790ac3f3 100644 --- a/adminer/drivers/mssql.inc.php +++ b/adminer/drivers/mssql.inc.php @@ -93,7 +93,7 @@ if (isset($_GET["mssql"])) { class Min_Result { var $_result, $_offset = 0, $_fields, $num_rows; - function Min_Result($result) { + function __construct($result) { $this->_result = $result; // $this->num_rows = sqlsrv_num_rows($result); // available only in scrollable results } @@ -201,7 +201,7 @@ if (isset($_GET["mssql"])) { class Min_Result { var $_result, $_offset = 0, $_fields, $num_rows; - function Min_Result($result) { + function __construct($result) { $this->_result = $result; $this->num_rows = mssql_num_rows($result); } diff --git a/adminer/drivers/mysql.inc.php b/adminer/drivers/mysql.inc.php index 47f22a2a..51aa4072 100644 --- a/adminer/drivers/mysql.inc.php +++ b/adminer/drivers/mysql.inc.php @@ -9,7 +9,7 @@ if (!defined("DRIVER")) { class Min_DB extends MySQLi { var $extension = "MySQLi"; - function Min_DB() { + function __construct() { parent::init(); } @@ -181,7 +181,7 @@ if (!defined("DRIVER")) { /** Constructor * @param resource */ - function Min_Result($result) { + function __construct($result) { $this->_result = $result; $this->num_rows = mysql_num_rows($result); } diff --git a/adminer/drivers/oracle.inc.php b/adminer/drivers/oracle.inc.php index c26c0d25..363481f6 100644 --- a/adminer/drivers/oracle.inc.php +++ b/adminer/drivers/oracle.inc.php @@ -80,7 +80,7 @@ if (isset($_GET["oracle"])) { class Min_Result { var $_result, $_offset = 1, $num_rows; - function Min_Result($result) { + function __construct($result) { $this->_result = $result; } diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php index f8c51be8..22c9142d 100644 --- a/adminer/drivers/pgsql.inc.php +++ b/adminer/drivers/pgsql.inc.php @@ -94,7 +94,7 @@ if (isset($_GET["pgsql"])) { class Min_Result { var $_result, $_offset = 0, $num_rows; - function Min_Result($result) { + function __construct($result) { $this->_result = $result; $this->num_rows = pg_num_rows($result); } diff --git a/adminer/drivers/simpledb.inc.php b/adminer/drivers/simpledb.inc.php index be1c28bb..d2c805dd 100644 --- a/adminer/drivers/simpledb.inc.php +++ b/adminer/drivers/simpledb.inc.php @@ -56,7 +56,7 @@ if (isset($_GET["simpledb"])) { class Min_Result { var $num_rows, $_rows = array(), $_offset = 0; - function Min_Result($result) { + function __construct($result) { foreach ($result as $item) { $row = array(); if ($item->Name != '') { // SELECT COUNT(*) diff --git a/adminer/drivers/sqlite.inc.php b/adminer/drivers/sqlite.inc.php index 4b1d9aa2..ab018e3f 100644 --- a/adminer/drivers/sqlite.inc.php +++ b/adminer/drivers/sqlite.inc.php @@ -11,7 +11,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) { class Min_SQLite { var $extension = "SQLite3", $server_info, $affected_rows, $errno, $error, $_link; - function Min_SQLite($filename) { + function __construct($filename) { $this->_link = new SQLite3($filename); $version = $this->_link->version(); $this->server_info = $version["versionString"]; @@ -55,7 +55,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) { class Min_Result { var $_result, $_offset = 0, $num_rows; - function Min_Result($result) { + function __construct($result) { $this->_result = $result; } @@ -87,7 +87,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) { class Min_SQLite { var $extension = "SQLite", $server_info, $affected_rows, $error, $_link; - function Min_SQLite($filename) { + function __construct($filename) { $this->server_info = sqlite_libversion(); $this->_link = new SQLiteDatabase($filename); } @@ -127,7 +127,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) { class Min_Result { var $_result, $_offset = 0, $num_rows; - function Min_Result($result) { + function __construct($result) { $this->_result = $result; if (method_exists($result, 'numRows')) { // not available in unbuffered query $this->num_rows = $result->numRows(); @@ -172,7 +172,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) { class Min_SQLite extends Min_PDO { var $extension = "PDO_SQLite"; - function Min_SQLite($filename) { + function __construct($filename) { $this->dsn(DRIVER . ":$filename", "", ""); } } @@ -182,13 +182,13 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) { if (class_exists("Min_SQLite")) { class Min_DB extends Min_SQLite { - function Min_DB() { - $this->Min_SQLite(":memory:"); + function __construct() { + parent::__construct(":memory:"); } function select_db($filename) { if (is_readable($filename) && $this->query("ATTACH " . $this->quote(preg_match("~(^[/\\\\]|:)~", $filename) ? $filename : dirname($_SERVER["SCRIPT_FILENAME"]) . "/$filename") . " AS a")) { // is_readable - SQLite 3 - $this->Min_SQLite($filename); + parent::__construct($filename); return true; } return false; @@ -440,7 +440,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) { function drop_databases($databases) { global $connection; - $connection->Min_SQLite(":memory:"); // to unlock file, doesn't work in PDO on Windows + $connection->__construct(":memory:"); // to unlock file, doesn't work in PDO on Windows foreach ($databases as $db) { if (!@unlink($db)) { $connection->error = lang('File exists.'); @@ -455,7 +455,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) { if (!check_sqlite_name($name)) { return false; } - $connection->Min_SQLite(":memory:"); + $connection->__construct(":memory:"); $connection->error = lang('File exists.'); return @rename(DB, $name); } diff --git a/adminer/include/driver.inc.php b/adminer/include/driver.inc.php index 2b06e90a..ba4c1ef0 100644 --- a/adminer/include/driver.inc.php +++ b/adminer/include/driver.inc.php @@ -6,7 +6,7 @@ /** Create object for performing database operations * @param Min_DB */ - function Min_SQL($connection) { + function __construct($connection) { $this->_conn = $connection; } diff --git a/adminer/include/tmpfile.inc.php b/adminer/include/tmpfile.inc.php index 2038868e..a7ca9164 100644 --- a/adminer/include/tmpfile.inc.php +++ b/adminer/include/tmpfile.inc.php @@ -4,7 +4,7 @@ class TmpFile { var $handler; var $size; - function TmpFile() { + function __construct() { $this->handler = tmpfile(); } diff --git a/plugins/database-hide.php b/plugins/database-hide.php index 314dc4a3..17e648c0 100644 --- a/plugins/database-hide.php +++ b/plugins/database-hide.php @@ -12,7 +12,7 @@ class AdminerDatabaseHide { /** * @param array case insensitive database names in values */ - function AdminerDatabaseHide($disabled) { + function __construct($disabled) { $this->disabled = array_map('strtolower', $disabled); } diff --git a/plugins/edit-calendar.php b/plugins/edit-calendar.php index f664213a..ea8dd11c 100644 --- a/plugins/edit-calendar.php +++ b/plugins/edit-calendar.php @@ -16,7 +16,7 @@ class AdminerEditCalendar { * @param string text to append before first calendar usage * @param string path to language file, %s stands for language code */ - function AdminerEditCalendar($prepend = "\n\n\n\n", $langPath = "jquery-ui/i18n/jquery.ui.datepicker-%s.js") { + function __construct($prepend = "\n\n\n\n", $langPath = "jquery-ui/i18n/jquery.ui.datepicker-%s.js") { $this->prepend = $prepend; $this->langPath = $langPath; } diff --git a/plugins/edit-foreign.php b/plugins/edit-foreign.php index 98a0be5f..4b78c43c 100644 --- a/plugins/edit-foreign.php +++ b/plugins/edit-foreign.php @@ -9,7 +9,7 @@ class AdminerEditForeign { var $_limit; - function AdminerEditForeign($limit = 0) { + function __construct($limit = 0) { $this->_limit = $limit; } diff --git a/plugins/email-table.php b/plugins/email-table.php index f7e1d10e..d57130d0 100644 --- a/plugins/email-table.php +++ b/plugins/email-table.php @@ -17,7 +17,7 @@ class AdminerEmailTable { * @param string quoted column name * @param string quoted column name */ - function AdminerEmailTable($table = "email", $id = "id", $title = "subject", $subject = "subject", $message = "message") { + function __construct($table = "email", $id = "id", $title = "subject", $subject = "subject", $message = "message") { $this->table = $table; $this->id = $id; $this->title = $title; diff --git a/plugins/file-upload.php b/plugins/file-upload.php index c96cb6a7..939412d2 100644 --- a/plugins/file-upload.php +++ b/plugins/file-upload.php @@ -16,7 +16,7 @@ class AdminerFileUpload { * @param string prefix for displaying data, null stands for $uploadPath * @param string regular expression with allowed file extensions */ - function AdminerFileUpload($uploadPath = "../static/data/", $displayPath = null, $extensions = "[a-zA-Z0-9]+") { + function __construct($uploadPath = "../static/data/", $displayPath = null, $extensions = "[a-zA-Z0-9]+") { $this->uploadPath = $uploadPath; $this->displayPath = ($displayPath !== null ? $displayPath : $uploadPath); $this->extensions = $extensions; diff --git a/plugins/frames.php b/plugins/frames.php index 45202200..2eaad295 100644 --- a/plugins/frames.php +++ b/plugins/frames.php @@ -13,7 +13,7 @@ class AdminerFrames { /** * @param bool allow running from the same origin only */ - function AdminerFrames($sameOrigin = false) { + function __construct($sameOrigin = false) { $this->sameOrigin = $sameOrigin; } diff --git a/plugins/login-servers.php b/plugins/login-servers.php index ce85b58d..d0e2c208 100644 --- a/plugins/login-servers.php +++ b/plugins/login-servers.php @@ -14,7 +14,7 @@ class AdminerLoginServers { * @param array array($domain) or array($domain => $description) or array($category => array()) * @param string */ - function AdminerLoginServers($servers, $driver = "server") { + function __construct($servers, $driver = "server") { $this->servers = $servers; $this->driver = $driver; } diff --git a/plugins/login-table.php b/plugins/login-table.php index 11b1e015..32a97fc7 100644 --- a/plugins/login-table.php +++ b/plugins/login-table.php @@ -22,7 +22,7 @@ class AdminerLoginTable { /** Set database of login table * @param string */ - function AdminerLoginTable($database) { + function __construct($database) { $this->database = $database; } diff --git a/plugins/master-slave.php b/plugins/master-slave.php index 10c54549..29f739d1 100644 --- a/plugins/master-slave.php +++ b/plugins/master-slave.php @@ -12,7 +12,7 @@ class AdminerMasterSlave { /** * @param array ($slave => $master) */ - function AdminerMasterSlave($masters) { + function __construct($masters) { $this->masters = $masters; } diff --git a/plugins/plugin.php b/plugins/plugin.php index 62ee7c4b..38e7b36d 100644 --- a/plugins/plugin.php +++ b/plugins/plugin.php @@ -20,7 +20,7 @@ class AdminerPlugin extends Adminer { /** Register plugins * @param array object instances or null to register all classes starting by 'Adminer' */ - function AdminerPlugin($plugins) { + function __construct($plugins) { if ($plugins === null) { $plugins = array(); foreach (get_declared_classes() as $class) { diff --git a/plugins/slugify.php b/plugins/slugify.php index 3c4b4305..b753b69b 100644 --- a/plugins/slugify.php +++ b/plugins/slugify.php @@ -14,7 +14,7 @@ class AdminerSlugify { * @param string find these characters ... * @param string ... and replace them by these */ - function AdminerSlugify($from = 'áčďéěíňóřšťúůýž', $to = 'acdeeinorstuuyz') { + function __construct($from = 'áčďéěíňóřšťúůýž', $to = 'acdeeinorstuuyz') { $this->from = $from; $this->to = $to; } diff --git a/plugins/sql-log.php b/plugins/sql-log.php index f962083f..2c5f2d5f 100644 --- a/plugins/sql-log.php +++ b/plugins/sql-log.php @@ -13,7 +13,7 @@ class AdminerSqlLog { /** * @param string defaults to "$database.sql" */ - function AdminerSqlLog($filename = "") { + function __construct($filename = "") { $this->filename = $filename; } diff --git a/plugins/tinymce.php b/plugins/tinymce.php index 4a547c94..e5bedb62 100644 --- a/plugins/tinymce.php +++ b/plugins/tinymce.php @@ -14,7 +14,7 @@ class AdminerTinymce { /** * @param string */ - function AdminerTinymce($path = "tiny_mce/tiny_mce.js") { + function __construct($path = "tiny_mce/tiny_mce.js") { $this->path = $path; } diff --git a/plugins/wymeditor.php b/plugins/wymeditor.php index 8185fdb7..20d25afd 100644 --- a/plugins/wymeditor.php +++ b/plugins/wymeditor.php @@ -15,7 +15,7 @@ class AdminerWymeditor { * @param array * @param string in format "skin: 'custom', preInit: function () { }" */ - function AdminerWymeditor($scripts = array("jquery/jquery.js", "wymeditor/jquery.wymeditor.min.js"), $options = "") { + function __construct($scripts = array("jquery/jquery.js", "wymeditor/jquery.wymeditor.min.js"), $options = "") { $this->scripts = $scripts; $this->options = $options; }