From ebd5f19dd483e5a707f4d45a60bb42f0a209194a Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Tue, 11 Mar 2025 07:21:13 +0100 Subject: [PATCH] Use protected visibility --- plugins/designs.php | 3 +-- plugins/dump-bz2.php | 3 +-- plugins/dump-json.php | 3 +-- plugins/dump-php.php | 4 ++-- plugins/dump-xml.php | 3 +-- plugins/dump-zip.php | 3 +-- plugins/edit-calendar.php | 3 +-- plugins/edit-foreign.php | 8 ++++---- plugins/email-table.php | 3 +-- plugins/file-upload.php | 3 +-- plugins/frames.php | 3 +-- plugins/login-ip.php | 5 +---- plugins/login-otp.php | 3 +-- plugins/login-password-less.php | 3 +-- plugins/login-servers.php | 3 +-- plugins/login-ssl.php | 3 +-- plugins/login-table.php | 3 +-- plugins/plugin.php | 3 +-- plugins/slugify.php | 3 +-- plugins/sql-log.php | 3 +-- plugins/tinymce.php | 3 +-- plugins/wymeditor.php | 3 +-- 22 files changed, 26 insertions(+), 48 deletions(-) diff --git a/plugins/designs.php b/plugins/designs.php index 4300dd40..29e69d07 100644 --- a/plugins/designs.php +++ b/plugins/designs.php @@ -7,8 +7,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerDesigns { - /** @access protected */ - var $designs; + protected $designs; /** * @param array URL in key, name in value diff --git a/plugins/dump-bz2.php b/plugins/dump-bz2.php index 19d20855..47351abc 100644 --- a/plugins/dump-bz2.php +++ b/plugins/dump-bz2.php @@ -8,8 +8,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerDumpBz2 { - /** @access protected */ - var $filename, $fp; + protected $filename, $fp; function dumpOutput() { if (!function_exists('bzopen')) { diff --git a/plugins/dump-json.php b/plugins/dump-json.php index 59230385..a295e3dc 100644 --- a/plugins/dump-json.php +++ b/plugins/dump-json.php @@ -7,8 +7,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerDumpJson { - /** @access protected */ - var $database = false; + protected $database = false; function dumpFormat() { return array('json' => 'JSON'); diff --git a/plugins/dump-php.php b/plugins/dump-php.php index e0ef30fa..c1e36a2d 100644 --- a/plugins/dump-php.php +++ b/plugins/dump-php.php @@ -6,8 +6,8 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerDumpPhp { - var $output = array(); - var $shutdown_callback = false; + protected $output = array(); + protected $shutdown_callback = false; function dumpFormat() { return array('php' => 'PHP'); diff --git a/plugins/dump-xml.php b/plugins/dump-xml.php index 1ab9be04..b983cfad 100644 --- a/plugins/dump-xml.php +++ b/plugins/dump-xml.php @@ -7,8 +7,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerDumpXml { - /** @access protected */ - var $database = false; + protected $database = false; function dumpFormat() { return array('xml' => 'XML'); diff --git a/plugins/dump-zip.php b/plugins/dump-zip.php index 0c573364..ac450aa2 100644 --- a/plugins/dump-zip.php +++ b/plugins/dump-zip.php @@ -8,8 +8,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerDumpZip { - /** @access protected */ - var $filename, $data; + protected $filename, $data; function dumpOutput() { if (!class_exists('ZipArchive')) { diff --git a/plugins/edit-calendar.php b/plugins/edit-calendar.php index be53c576..d6a052d2 100644 --- a/plugins/edit-calendar.php +++ b/plugins/edit-calendar.php @@ -9,8 +9,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerEditCalendar { - /** @access protected */ - var $prepend, $langPath; + protected $prepend, $langPath; /** * @param string text to append before first calendar usage diff --git a/plugins/edit-foreign.php b/plugins/edit-foreign.php index 2e4236f6..df8ed64d 100644 --- a/plugins/edit-foreign.php +++ b/plugins/edit-foreign.php @@ -7,10 +7,10 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerEditForeign { - var $_limit; + protected $limit; function __construct($limit = 0) { - $this->_limit = $limit; + $this->limit = $limit; } function editInput($table, $field, $attrs, $value) { @@ -30,8 +30,8 @@ class AdminerEditForeign { if (preg_match('~binary~', $field["type"])) { $column = "HEX($column)"; } - $options = array("" => "") + Adminer\get_vals("SELECT $column FROM " . Adminer\table($target) . " ORDER BY 1" . ($this->_limit ? " LIMIT " . ($this->_limit + 1) : "")); - if ($this->_limit && count($options) - 1 > $this->_limit) { + $options = array("" => "") + Adminer\get_vals("SELECT $column FROM " . Adminer\table($target) . " ORDER BY 1" . ($this->limit ? " LIMIT " . ($this->limit + 1) : "")); + if ($this->limit && count($options) - 1 > $this->limit) { return; } } diff --git a/plugins/email-table.php b/plugins/email-table.php index c7e9c912..d5bc22b1 100644 --- a/plugins/email-table.php +++ b/plugins/email-table.php @@ -7,8 +7,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerEmailTable { - /** @access protected */ - var $table, $id, $title, $subject, $message; + protected $table, $id, $title, $subject, $message; /** * @param string quoted table name diff --git a/plugins/file-upload.php b/plugins/file-upload.php index d611ec89..ee60154d 100644 --- a/plugins/file-upload.php +++ b/plugins/file-upload.php @@ -8,8 +8,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerFileUpload { - /** @access protected */ - var $uploadPath, $displayPath, $extensions; + protected $uploadPath, $displayPath, $extensions; /** * @param string prefix for uploading data (create writable subdirectory for each table containing uploadable fields) diff --git a/plugins/frames.php b/plugins/frames.php index e4130370..c025d27e 100644 --- a/plugins/frames.php +++ b/plugins/frames.php @@ -7,8 +7,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerFrames { - /** @access protected */ - var $sameOrigin; + protected $sameOrigin; /** * @param bool allow running from the same origin only diff --git a/plugins/login-ip.php b/plugins/login-ip.php index 0b367da2..2e6d8fa6 100644 --- a/plugins/login-ip.php +++ b/plugins/login-ip.php @@ -7,10 +7,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerLoginIp { - /** @access protected */ - var $ips; - /** @access protected */ - var $forwarded_for; + protected $ips, $forwarded_for; /** Set allowed IP addresses * @param array IP address prefixes diff --git a/plugins/login-otp.php b/plugins/login-otp.php index b25ea1d9..bfe07b1d 100644 --- a/plugins/login-otp.php +++ b/plugins/login-otp.php @@ -7,8 +7,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerLoginOtp { - /** @access protected */ - var $secret; + protected $secret; /** * @param string decoded secret, e.g. base64_decode("SECRET") diff --git a/plugins/login-password-less.php b/plugins/login-password-less.php index 360a23e0..9f6d7bbb 100644 --- a/plugins/login-password-less.php +++ b/plugins/login-password-less.php @@ -7,8 +7,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerLoginPasswordLess { - /** @access protected */ - var $password_hash; + protected $password_hash; /** Set allowed password * @param string result of password_hash diff --git a/plugins/login-servers.php b/plugins/login-servers.php index c992a693..5cad6f2e 100644 --- a/plugins/login-servers.php +++ b/plugins/login-servers.php @@ -7,8 +7,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerLoginServers { - /** @access protected */ - var $servers; + protected $servers; /** Set supported servers * @param array [$description => ["server" => , "driver" => "server|pgsql|sqlite|..."]] diff --git a/plugins/login-ssl.php b/plugins/login-ssl.php index ca8c9323..a641a7b4 100644 --- a/plugins/login-ssl.php +++ b/plugins/login-ssl.php @@ -7,8 +7,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerLoginSsl { - /** @access protected */ - var $ssl; + protected $ssl; /** * @param array diff --git a/plugins/login-table.php b/plugins/login-table.php index 051b2cff..48ac08f5 100644 --- a/plugins/login-table.php +++ b/plugins/login-table.php @@ -16,8 +16,7 @@ CREATE TABLE login ( * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerLoginTable { - /** @access protected */ - var $database; + protected $database; /** Set database of login table * @param string diff --git a/plugins/plugin.php b/plugins/plugin.php index ccef2f20..551a15f7 100644 --- a/plugins/plugin.php +++ b/plugins/plugin.php @@ -7,8 +7,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerPlugin extends Adminer\Adminer { - /** @access protected */ - var $plugins; + protected $plugins; /** Register plugins * @param array object instances or null to register all classes starting by 'Adminer' diff --git a/plugins/slugify.php b/plugins/slugify.php index 6331db35..f15ab554 100644 --- a/plugins/slugify.php +++ b/plugins/slugify.php @@ -7,8 +7,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerSlugify { - /** @access protected */ - var $from, $to; + protected $from, $to; /** * @param string find these characters ... diff --git a/plugins/sql-log.php b/plugins/sql-log.php index 9a746896..8e632225 100644 --- a/plugins/sql-log.php +++ b/plugins/sql-log.php @@ -7,8 +7,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerSqlLog { - /** @access protected */ - var $filename; + protected $filename; /** * @param string defaults to "$database.sql" diff --git a/plugins/tinymce.php b/plugins/tinymce.php index 64bc017f..2bb109f8 100644 --- a/plugins/tinymce.php +++ b/plugins/tinymce.php @@ -8,8 +8,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerTinymce { - /** @access protected */ - var $path; + protected $path; /** * @param string diff --git a/plugins/wymeditor.php b/plugins/wymeditor.php index 0502aee9..146e7593 100644 --- a/plugins/wymeditor.php +++ b/plugins/wymeditor.php @@ -8,8 +8,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ class AdminerWymeditor { - /** @access protected */ - var $scripts, $options; + protected $scripts, $options; /** * @param array