]> git.joonet.de Git - adminer.git/commitdiff
Change var to public
authorJakub Vrana <jakub@vrana.cz>
Tue, 11 Mar 2025 07:08:32 +0000 (08:08 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 11 Mar 2025 07:17:00 +0000 (08:17 +0100)
14 files changed:
adminer/drivers/mongo.inc.php
adminer/drivers/mssql.inc.php
adminer/drivers/mysql.inc.php
adminer/drivers/oracle.inc.php
adminer/drivers/pgsql.inc.php
adminer/drivers/sqlite.inc.php
adminer/include/adminer.inc.php
adminer/include/driver.inc.php
adminer/include/pdo.inc.php
editor/include/adminer.inc.php
plugins/drivers/clickhouse.php
plugins/drivers/elastic.php
plugins/drivers/firebird.php
plugins/drivers/simpledb.php

index 177c90de34275a5762dae70cb31da28f00f30b08..15e147ef1215053540ac4f284c573d52c4afca47 100644 (file)
@@ -8,10 +8,10 @@ if (isset($_GET["mongo"])) {
 
        if (class_exists('MongoDB\Driver\Manager')) {
                class Db {
-                       var $extension = "MongoDB", $server_info = MONGODB_VERSION, $affected_rows, $error, $last_id;
+                       public $extension = "MongoDB", $server_info = MONGODB_VERSION, $affected_rows, $error, $last_id;
                        /** @var MongoDB\Driver\Manager */
-                       var $_link;
-                       var $_db, $_db_name;
+                       public $_link;
+                       public $_db, $_db_name;
 
                        function connect($uri, $options) {
                                $this->_link = new \MongoDB\Driver\Manager($uri, $options);
@@ -53,7 +53,7 @@ if (isset($_GET["mongo"])) {
                }
 
                class Result {
-                       var $num_rows;
+                       public $num_rows;
                        private $rows = array(), $offset = 0, $charset = array();
 
                        function __construct($result) {
@@ -285,9 +285,9 @@ if (isset($_GET["mongo"])) {
                static $possibleDrivers = array("mongodb");
                static $jush = "mongo";
 
-               var $editFunctions = array(array("json"));
+               public $editFunctions = array(array("json"));
 
-               var $operators = array(
+               public $operators = array(
                        "=",
                        "!=",
                        ">",
index 8626bdcc8413d3a45923c77ef1c5ed4a38f3efd6..246953f84564edd7fdb2d3cbd5066c8a610c5a0b 100644 (file)
@@ -13,7 +13,7 @@ if (isset($_GET["mssql"])) {
        define('Adminer\DRIVER', "mssql");
        if (extension_loaded("sqlsrv")) {
                class Db {
-                       var $extension = "sqlsrv", $server_info, $affected_rows, $errno, $error;
+                       public $extension = "sqlsrv", $server_info, $affected_rows, $errno, $error;
                        private $link, $result;
 
                        private function get_error() {
@@ -107,7 +107,7 @@ if (isset($_GET["mssql"])) {
                }
 
                class Result {
-                       var $num_rows;
+                       public $num_rows;
                        private $result, $offset = 0, $fields;
 
                        function __construct($result) {
@@ -158,7 +158,7 @@ if (isset($_GET["mssql"])) {
 
        } elseif (extension_loaded("pdo_sqlsrv")) {
                class Db extends PdoDb {
-                       var $extension = "PDO_SQLSRV";
+                       public $extension = "PDO_SQLSRV";
 
                        function connect($server, $username, $password) {
                                $this->dsn("sqlsrv:Server=" . str_replace(":", ",", $server), $username, $password);
@@ -173,7 +173,7 @@ if (isset($_GET["mssql"])) {
 
        } elseif (extension_loaded("pdo_dblib")) {
                class Db extends PdoDb {
-                       var $extension = "PDO_DBLIB";
+                       public $extension = "PDO_DBLIB";
 
                        function connect($server, $username, $password) {
                                $this->dsn("dblib:charset=utf8;host=" . str_replace(":", ";unix_socket=", preg_replace('~:(\d)~', ';port=\1', $server)), $username, $password);
@@ -191,7 +191,7 @@ if (isset($_GET["mssql"])) {
                static $possibleDrivers = array("SQLSRV", "PDO_SQLSRV", "PDO_DBLIB");
                static $jush = "mssql";
 
-               var $editFunctions = array(
+               public $editFunctions = array(
                        array(
                                "date|time" => "getdate",
                        ), array(
@@ -200,11 +200,11 @@ if (isset($_GET["mssql"])) {
                        )
                );
 
-               var $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL");
-               var $functions = array("len", "lower", "round", "upper");
-               var $grouping = array("avg", "count", "count distinct", "max", "min", "sum");
-               var $onActions = "NO ACTION|CASCADE|SET NULL|SET DEFAULT";
-               var $generated = array("PERSISTED", "VIRTUAL");
+               public $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL");
+               public $functions = array("len", "lower", "round", "upper");
+               public $grouping = array("avg", "count", "count distinct", "max", "min", "sum");
+               public $onActions = "NO ACTION|CASCADE|SET NULL|SET DEFAULT";
+               public $generated = array("PERSISTED", "VIRTUAL");
 
                function __construct($connection) {
                        parent::__construct($connection);
index d4c67ce31a32d2ab661bfd74b64b5acb9e52b78d..8e7e9a9f6c42d0cd3c2381e120c431fe26d7ffbc 100644 (file)
@@ -8,7 +8,7 @@ if (!defined('Adminer\DRIVER')) {
        // MySQLi supports everything, MySQL doesn't support multiple result sets, PDO_MySQL doesn't support orgtable
        if (extension_loaded("mysqli")) {
                class Db extends \MySQLi {
-                       var $extension = "MySQLi";
+                       public $extension = "MySQLi";
 
                        function __construct() {
                                parent::init();
@@ -60,7 +60,7 @@ if (!defined('Adminer\DRIVER')) {
 
        } elseif (extension_loaded("mysql") && !((ini_bool("sql.safe_mode") || ini_bool("mysql.allow_local_infile")) && extension_loaded("pdo_mysql"))) {
                class Db {
-                       var
+                       public
                                $extension = "MySQL", ///< @var string extension name
                                $server_info, ///< @var string server version
                                $affected_rows, ///< @var int number of affected rows
@@ -185,7 +185,7 @@ if (!defined('Adminer\DRIVER')) {
                }
 
                class Result {
-                       var $num_rows; ///< @var int number of rows in the result
+                       public $num_rows; ///< @var int number of rows in the result
                        private $result, $offset = 0;
 
                        /** Constructor
@@ -230,7 +230,7 @@ if (!defined('Adminer\DRIVER')) {
 
        } elseif (extension_loaded("pdo_mysql")) {
                class Db extends PdoDb {
-                       var $extension = "PDO_MySQL";
+                       public $extension = "PDO_MySQL";
 
                        function connect($server, $username, $password) {
                                global $adminer;
@@ -282,10 +282,10 @@ if (!defined('Adminer\DRIVER')) {
                static $possibleDrivers = array("MySQLi", "MySQL", "PDO_MySQL");
                static $jush = "sql"; ///< @var string JUSH identifier
 
-               var $unsigned = array("unsigned", "zerofill", "unsigned zerofill");
-               var $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "REGEXP", "IN", "FIND_IN_SET", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL", "SQL");
-               var $functions = array("char_length", "date", "from_unixtime", "lower", "round", "floor", "ceil", "sec_to_time", "time_to_sec", "upper");
-               var $grouping = array("avg", "count", "count distinct", "group_concat", "max", "min", "sum");
+               public $unsigned = array("unsigned", "zerofill", "unsigned zerofill");
+               public $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "REGEXP", "IN", "FIND_IN_SET", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL", "SQL");
+               public $functions = array("char_length", "date", "from_unixtime", "lower", "round", "floor", "ceil", "sec_to_time", "time_to_sec", "upper");
+               public $grouping = array("avg", "count", "count distinct", "group_concat", "max", "min", "sum");
 
                function __construct($connection) {
                        parent::__construct($connection);
index 9d368844bd67039be0de25ee13fca4c0ef05b09f..7b831025836cc29c8481a5c676f766445d0a02d0 100644 (file)
@@ -7,9 +7,9 @@ if (isset($_GET["oracle"])) {
        define('Adminer\DRIVER', "oracle");
        if (extension_loaded("oci8")) {
                class Db {
-                       var $extension = "oci8", $server_info, $affected_rows, $errno, $error;
+                       public $extension = "oci8", $server_info, $affected_rows, $errno, $error;
+                       public $_current_db;
                        private $link, $result;
-                       var $_current_db;
 
                        function _error($errno, $error) {
                                if (ini_bool("html_errors")) {
@@ -83,7 +83,7 @@ if (isset($_GET["oracle"])) {
                }
 
                class Result {
-                       var $num_rows;
+                       public $num_rows;
                        private $result, $offset = 1;
 
                        function __construct($result) {
@@ -124,8 +124,8 @@ if (isset($_GET["oracle"])) {
 
        } elseif (extension_loaded("pdo_oci")) {
                class Db extends PdoDb {
-                       var $extension = "PDO_OCI";
-                       var $_current_db;
+                       public $extension = "PDO_OCI";
+                       public $_current_db;
 
                        function connect($server, $username, $password) {
                                $this->dsn("oci:dbname=//$server;charset=AL32UTF8", $username, $password);
@@ -146,7 +146,7 @@ if (isset($_GET["oracle"])) {
                static $possibleDrivers = array("OCI8", "PDO_OCI");
                static $jush = "oracle";
 
-               var $editFunctions = array(
+               public $editFunctions = array(
                        array( //! no parentheses
                                "date" => "current_date",
                                "timestamp" => "current_timestamp",
@@ -157,9 +157,9 @@ if (isset($_GET["oracle"])) {
                        )
                );
 
-               var $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", "SQL");
-               var $functions = array("length", "lower", "round", "upper");
-               var $grouping = array("avg", "count", "count distinct", "max", "min", "sum");
+               public $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", "SQL");
+               public $functions = array("length", "lower", "round", "upper");
+               public $grouping = array("avg", "count", "count distinct", "max", "min", "sum");
 
                function __construct($connection) {
                        parent::__construct($connection);
index 4d96cb5e3b627f40a347cffe23775f6bd9de16a9..7b4061bc28f7b3fc28a5101852641404024021d1 100644 (file)
@@ -7,7 +7,7 @@ if (isset($_GET["pgsql"])) {
        define('Adminer\DRIVER', "pgsql");
        if (extension_loaded("pgsql")) {
                class Db {
-                       var $extension = "PgSQL", $server_info, $affected_rows, $error, $timeout;
+                       public $extension = "PgSQL", $server_info, $affected_rows, $error, $timeout;
                        private $link, $result, $string, $database = true;
 
                        function _error($errno, $error) {
@@ -116,7 +116,7 @@ if (isset($_GET["pgsql"])) {
                }
 
                class Result {
-                       var $num_rows;
+                       public $num_rows;
                        private $result, $offset = 0;
 
                        function __construct($result) {
@@ -152,7 +152,7 @@ if (isset($_GET["pgsql"])) {
 
        } elseif (extension_loaded("pdo_pgsql")) {
                class Db extends PdoDb {
-                       var $extension = "PDO_PgSQL", $timeout;
+                       public $extension = "PDO_PgSQL", $timeout;
 
                        function connect($server, $username, $password) {
                                global $adminer;
@@ -201,9 +201,9 @@ if (isset($_GET["pgsql"])) {
                static $possibleDrivers = array("PgSQL", "PDO_PgSQL");
                static $jush = "pgsql";
 
-               var $operators = array("=", "<", ">", "<=", ">=", "!=", "~", "!~", "LIKE", "LIKE %%", "ILIKE", "ILIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL"); // no "SQL" to avoid CSRF
-               var $functions = array("char_length", "lower", "round", "to_hex", "to_timestamp", "upper");
-               var $grouping = array("avg", "count", "count distinct", "max", "min", "sum");
+               public $operators = array("=", "<", ">", "<=", ">=", "!=", "~", "!~", "LIKE", "LIKE %%", "ILIKE", "ILIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL"); // no "SQL" to avoid CSRF
+               public $functions = array("char_length", "lower", "round", "to_hex", "to_timestamp", "upper");
+               public $grouping = array("avg", "count", "count distinct", "max", "min", "sum");
 
                function __construct($connection) {
                        parent::__construct($connection);
index da29f02ef0b3177d8842e35c553c14034b3333dd..27d6f9b91dfe597ba5a80e74136d05e005981971 100644 (file)
@@ -8,7 +8,7 @@ if (isset($_GET["sqlite"])) {
        if (class_exists("SQLite3")) {
 
                class SqliteDb {
-                       var $extension = "SQLite3", $server_info, $affected_rows, $errno, $error;
+                       public $extension = "SQLite3", $server_info, $affected_rows, $errno, $error;
                        private $link;
 
                        function __construct($filename) {
@@ -53,7 +53,7 @@ if (isset($_GET["sqlite"])) {
                }
 
                class Result {
-                       var $num_rows;
+                       public $num_rows;
                        private $result, $offset = 0;
 
                        function __construct($result) {
@@ -85,7 +85,7 @@ if (isset($_GET["sqlite"])) {
 
        } elseif (extension_loaded("pdo_sqlite")) {
                class SqliteDb extends PdoDb {
-                       var $extension = "PDO_SQLite";
+                       public $extension = "PDO_SQLite";
 
                        function __construct($filename) {
                                $this->dsn(DRIVER . ":$filename", "", "");
@@ -134,7 +134,7 @@ if (isset($_GET["sqlite"])) {
 
                protected $types = array(array("integer" => 0, "real" => 0, "numeric" => 0, "text" => 0, "blob" => 0));
 
-               var $editFunctions = array(
+               public $editFunctions = array(
                        array(
                                // "text" => "date('now')/time('now')/datetime('now')",
                        ), array(
@@ -144,9 +144,9 @@ if (isset($_GET["sqlite"])) {
                        )
                );
 
-               var $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", "SQL"); // REGEXP can be user defined function
-               var $functions = array("hex", "length", "lower", "round", "unixepoch", "upper");
-               var $grouping = array("avg", "count", "count distinct", "group_concat", "max", "min", "sum");
+               public $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", "SQL"); // REGEXP can be user defined function
+               public $functions = array("hex", "length", "lower", "round", "unixepoch", "upper");
+               public $grouping = array("avg", "count", "count distinct", "group_concat", "max", "min", "sum");
 
                function __construct($connection) {
                        parent::__construct($connection);
index 87dea46060cf279977cc8dfa6fe8922e51473327..7c8028de483cdefd6f970b53ace33538356787bf 100644 (file)
@@ -5,7 +5,7 @@ namespace Adminer;
 
 class Adminer {
        /** @var array operators used in select, null for all operators */
-       var $operators;
+       public $operators;
 
        /** Name in title and navigation
        * @return string HTML code
index 9dca7e0029cafb63cf37ea99b7130e72b14c9ae0..77c2d9ca150c23629d56d232bb9968a758f36e0e 100644 (file)
@@ -28,15 +28,15 @@ abstract class SqlDriver {
 
        protected $conn;
        protected $types = array(); ///< @var array [$description => [$type => $maximum_unsigned_length, ...], ...]
-       var $editFunctions = array(); ///< @var array of ["$type|$type2" => "$function/$function2"] functions used in editing, [0] - edit and insert, [1] - edit only
-       var $unsigned = array(); ///< @var array number variants
-       var $operators = array(); ///< @var array operators used in select
-       var $functions = array(); ///< @var array functions used in select
-       var $grouping = array(); ///< @var array grouping functions used in select
-       var $onActions = "RESTRICT|NO ACTION|CASCADE|SET NULL|SET DEFAULT"; ///< @var string used in foreign_keys()
-       var $inout = "IN|OUT|INOUT";
-       var $enumLength = "'(?:''|[^'\\\\]|\\\\.)*'";
-       var $generated = array();
+       public $editFunctions = array(); ///< @var array of ["$type|$type2" => "$function/$function2"] functions used in editing, [0] - edit and insert, [1] - edit only
+       public $unsigned = array(); ///< @var array number variants
+       public $operators = array(); ///< @var array operators used in select
+       public $functions = array(); ///< @var array functions used in select
+       public $grouping = array(); ///< @var array grouping functions used in select
+       public $onActions = "RESTRICT|NO ACTION|CASCADE|SET NULL|SET DEFAULT"; ///< @var string used in foreign_keys()
+       public $inout = "IN|OUT|INOUT";
+       public $enumLength = "'(?:''|[^'\\\\]|\\\\.)*'";
+       public $generated = array();
 
        /** Create object for performing database operations
        * @param Db
index 9dc1858e0fedaaa1fd70296173c95b04c43735cd..09eef0f50d1259bfd13c5a7a12e17a9050e43dfb 100644 (file)
@@ -4,7 +4,7 @@ namespace Adminer;
 // PDO can be used in several database drivers
 if (extension_loaded('pdo')) {
        abstract class PdoDb {
-               var $server_info, $affected_rows, $errno, $error, $pdo;
+               public $server_info, $affected_rows, $errno, $error, $pdo;
                private $result;
 
                function dsn($dsn, $username, $password, $options = array()) {
@@ -76,7 +76,7 @@ if (extension_loaded('pdo')) {
        }
 
        class PdoDbStatement extends \PDOStatement {
-               var $_offset = 0, $num_rows;
+               public $_offset = 0, $num_rows;
 
                function fetch_assoc() {
                        return $this->fetch(\PDO::FETCH_ASSOC);
index d6f71bc28b3b2faa1f07ac15e521b00513480f09..65ebb88b35f5abfbc6b4224ff15bcf4383c12cd6 100644 (file)
@@ -2,7 +2,7 @@
 namespace Adminer;
 
 class Adminer {
-       var $operators = array("<=", ">=");
+       public $operators = array("<=", ">=");
        private $values = array();
 
        function name() {
index 8b246034ee8eff5a1b4212e59c3906c34224fdd5..7fee09eecf36202ba85af9d8d1c815b85b159980 100644 (file)
@@ -8,9 +8,9 @@ if (isset($_GET["clickhouse"])) {
 
        if (ini_bool('allow_url_fopen')) {
                class Db {
-                       var $extension = "JSON", $server_info, $errno, $error;
+                       public $extension = "JSON", $server_info, $errno, $error;
+                       public $_db = 'default';
                        private $result, $url;
-                       var $_db = 'default';
 
                        function rootQuery($db, $query) {
                                $file = @file_get_contents("$this->url/?database=$db", false, stream_context_create(array('http' => array(
@@ -91,7 +91,7 @@ if (isset($_GET["clickhouse"])) {
                }
 
                class Result {
-                       var $num_rows, $columns, $meta;
+                       public $num_rows, $columns, $meta;
                        private $rows, $offset = 0;
 
                        function __construct($result) {
@@ -137,8 +137,8 @@ if (isset($_GET["clickhouse"])) {
                static $possibleDrivers = array("allow_url_fopen");
                static $jush = "clickhouse";
 
-               var $operators = array("=", "<", ">", "<=", ">=", "!=", "~", "!~", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", "SQL");
-               var $grouping = array("avg", "count", "count distinct", "max", "min", "sum");
+               public $operators = array("=", "<", ">", "<=", ">=", "!=", "~", "!~", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", "SQL");
+               public $grouping = array("avg", "count", "count distinct", "max", "min", "sum");
 
                function __construct($connection) {
                        parent::__construct($connection);
index 691f36878f7a8a860802c905c0fb1ad395676d9e..03a359d2890bfde367e107ccd04acaedbe0f506c 100644 (file)
@@ -9,7 +9,7 @@ if (isset($_GET["elastic"])) {
        if (ini_bool('allow_url_fopen')) {
 
                class Db {
-                       var $extension = "JSON", $server_info, $errno, $error;
+                       public $extension = "JSON", $server_info, $errno, $error;
                        private $url;
 
                        /**
@@ -97,7 +97,7 @@ if (isset($_GET["elastic"])) {
                }
 
                class Result {
-                       var $num_rows;
+                       public $num_rows;
                        private $rows;
 
                        function __construct($rows) {
@@ -126,8 +126,8 @@ if (isset($_GET["elastic"])) {
                static $possibleDrivers = array("json + allow_url_fopen");
                static $jush = "elastic";
 
-               var $editFunctions = array(array("json"));
-               var $operators = array("=", "must", "should", "must_not");
+               public $editFunctions = array(array("json"));
+               public $operators = array("=", "must", "should", "must_not");
 
                function __construct($connection) {
                        parent::__construct($connection);
index c42a30f4f66bb1a1dfae52515cc9768bbe211e66..1d319f3975941005ccd261c6a27a7b4c9d7f93df 100644 (file)
@@ -12,7 +12,7 @@ if (isset($_GET["firebird"])) {
 
        if (extension_loaded("interbase")) {
                class Db {
-                       var
+                       public
                                $extension = "Firebird",
                                $server_info,
                                $affected_rows,
@@ -81,7 +81,7 @@ if (isset($_GET["firebird"])) {
                }
 
                class Result {
-                       var $num_rows;
+                       public $num_rows;
                        private $result, $offset = 0;
 
                        function __construct($result) {
@@ -120,7 +120,7 @@ if (isset($_GET["firebird"])) {
                static $possibleDrivers = array("interbase");
                static $jush = "firebird";
 
-               var $operators = array("=");
+               public $operators = array("=");
        }
 
 
index 74268789cdd4ed0ef8d413bc9de91cfb4572cb1d..0ac5f3fd64352d7929fe8813387ac16bd8562f34 100644 (file)
@@ -8,7 +8,7 @@ if (isset($_GET["simpledb"])) {
 
        if (class_exists('SimpleXMLElement') && ini_bool('allow_url_fopen')) {
                class Db {
-                       var $extension = "SimpleXML", $server_info = '2009-04-15', $error, $timeout, $next, $affected_rows;
+                       public $extension = "SimpleXML", $server_info = '2009-04-15', $error, $timeout, $next, $affected_rows;
                        private $result;
 
                        function select_db($database) {
@@ -56,7 +56,7 @@ if (isset($_GET["simpledb"])) {
                }
 
                class Result {
-                       var $num_rows;
+                       public $num_rows;
                        private $rows = array(), $offset = 0;
 
                        function __construct($result) {
@@ -123,8 +123,8 @@ if (isset($_GET["simpledb"])) {
                static $possibleDrivers = array("SimpleXML + allow_url_fopen");
                static $jush = "simpledb";
 
-               var $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "IS NOT NULL");
-               var $grouping = array("count");
+               public $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "IS NOT NULL");
+               public $grouping = array("count");
 
                public $primary = "itemName()";