]> git.joonet.de Git - adminer.git/commitdiff
Use private visibility on methods
authorJakub Vrana <jakub@vrana.cz>
Tue, 11 Mar 2025 06:56:28 +0000 (07:56 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 11 Mar 2025 07:16:41 +0000 (08:16 +0100)
adminer/drivers/mssql.inc.php
editor/include/adminer.inc.php
plugins/drivers/simpledb.php
plugins/json-column.php
plugins/plugin.php
plugins/pretty-json-column.php
plugins/sql-log.php
plugins/translation.php

index 93d00541ce03b6c92a991a5c86a4c3fd101cd3c0..8626bdcc8413d3a45923c77ef1c5ed4a38f3efd6 100644 (file)
@@ -16,7 +16,7 @@ if (isset($_GET["mssql"])) {
                        var $extension = "sqlsrv", $server_info, $affected_rows, $errno, $error;
                        private $link, $result;
 
-                       function _get_error() {
+                       private function get_error() {
                                $this->error = "";
                                foreach (sqlsrv_errors() as $error) {
                                        $this->errno = $error["code"];
@@ -44,7 +44,7 @@ if (isset($_GET["mssql"])) {
                                        $info = sqlsrv_server_info($this->link);
                                        $this->server_info = $info['SQLServerVersion'];
                                } else {
-                                       $this->_get_error();
+                                       $this->get_error();
                                }
                                return (bool) $this->link;
                        }
@@ -62,7 +62,7 @@ if (isset($_GET["mssql"])) {
                                $result = sqlsrv_query($this->link, $query); //! , array(), ($unbuffered ? array() : array("Scrollable" => "keyset"))
                                $this->error = "";
                                if (!$result) {
-                                       $this->_get_error();
+                                       $this->get_error();
                                        return false;
                                }
                                return $this->store_result($result);
@@ -72,7 +72,7 @@ if (isset($_GET["mssql"])) {
                                $this->result = sqlsrv_query($this->link, $query);
                                $this->error = "";
                                if (!$this->result) {
-                                       $this->_get_error();
+                                       $this->get_error();
                                        return false;
                                }
                                return true;
index cd1beb324702b99bf41f0ea1fc2890b186fb4d6c..d6f71bc28b3b2faa1f07ac15e521b00513480f09 100644 (file)
@@ -248,7 +248,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row //! requires MySQL 5
                                );
                                echo "</div>\n";
                                unset($columns[$name]);
-                       } elseif (is_array($options = $this->_foreignKeyOptions($_GET["select"], $name))) {
+                       } elseif (is_array($options = $this->foreignKeyOptions($_GET["select"], $name))) {
                                if ($fields[$name]["null"]) {
                                        $options[0] = '(' . lang('empty') . ')';
                                }
@@ -482,7 +482,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row //! requires MySQL 5
                                . enum_input("radio", $attrs, $field, ($value || isset($_GET["select"]) ? $value : 0), ($field["null"] ? "" : null))
                        ;
                }
-               $options = $this->_foreignKeyOptions($table, $field["field"], $value);
+               $options = $this->foreignKeyOptions($table, $field["field"], $value);
                if ($options !== null) {
                        return (is_array($options)
                                ? "<select$attrs>" . optionlist($options, $value, true) . "</select>"
@@ -651,7 +651,7 @@ qsl('div').onclick = whisperClick;", "")
                }
        }
 
-       function _foreignKeyOptions($table, $column, $value = null) {
+       private function foreignKeyOptions($table, $column, $value = null) {
                if (list($target, $id, $name) = $this->_foreignColumn(column_foreign_keys($table), $column)) {
                        $return = &$this->values[$target];
                        if ($return === null) {
index 392c1e48d8695c38e91c08eb4367a3641570d0c8..74268789cdd4ed0ef8d413bc9de91cfb4572cb1d 100644 (file)
@@ -66,8 +66,8 @@ if (isset($_GET["simpledb"])) {
                                                $row['itemName()'] = (string) $item->Name;
                                        }
                                        foreach ($item->Attribute as $attribute) {
-                                               $name = $this->_processValue($attribute->Name);
-                                               $value = $this->_processValue($attribute->Value);
+                                               $name = $this->processValue($attribute->Name);
+                                               $value = $this->processValue($attribute->Value);
                                                if (isset($row[$name])) {
                                                        $row[$name] = (array) $row[$name];
                                                        $row[$name][] = $value;
@@ -85,7 +85,7 @@ if (isset($_GET["simpledb"])) {
                                $this->num_rows = count($this->rows);
                        }
 
-                       function _processValue($element) {
+                       private function processValue($element) {
                                return (is_object($element) && $element['encoding'] == 'base64' ? base64_decode($element) : (string) $element);
                        }
 
@@ -128,7 +128,7 @@ if (isset($_GET["simpledb"])) {
 
                public $primary = "itemName()";
 
-               function _chunkRequest($ids, $action, $params, $expand = array()) {
+               private function chunkRequest($ids, $action, $params, $expand = array()) {
                        $connection = connection();
                        foreach (array_chunk($ids, 25) as $chunk) {
                                $params2 = $params;
@@ -146,7 +146,7 @@ if (isset($_GET["simpledb"])) {
                        return true;
                }
 
-               function _extractIds($table, $queryWhere, $limit) {
+               private function extractIds($table, $queryWhere, $limit) {
                        $return = array();
                        if (preg_match_all("~itemName\(\) = (('[^']*+')+)~", $queryWhere, $matches)) {
                                $return = array_map('Adminer\idf_unescape', $matches[1]);
@@ -167,8 +167,8 @@ if (isset($_GET["simpledb"])) {
                }
 
                function delete($table, $queryWhere, $limit = 0) {
-                       return $this->_chunkRequest(
-                               $this->_extractIds($table, $queryWhere, $limit),
+                       return $this->chunkRequest(
+                               $this->extractIds($table, $queryWhere, $limit),
                                'BatchDeleteAttributes',
                                array('DomainName' => $table)
                        );
@@ -178,7 +178,7 @@ if (isset($_GET["simpledb"])) {
                        $delete = array();
                        $insert = array();
                        $i = 0;
-                       $ids = $this->_extractIds($table, $queryWhere, $limit);
+                       $ids = $this->extractIds($table, $queryWhere, $limit);
                        $id = idf_unescape($set["`itemName()`"]);
                        unset($set["`itemName()`"]);
                        foreach ($set as $key => $val) {
@@ -198,8 +198,8 @@ if (isset($_GET["simpledb"])) {
                                }
                        }
                        $params = array('DomainName' => $table);
-                       return (!$insert || $this->_chunkRequest(($id != "" ? array($id) : $ids), 'BatchPutAttributes', $params, $insert))
-                               && (!$delete || $this->_chunkRequest($ids, 'BatchDeleteAttributes', $params, $delete))
+                       return (!$insert || $this->chunkRequest(($id != "" ? array($id) : $ids), 'BatchPutAttributes', $params, $insert))
+                               && (!$delete || $this->chunkRequest($ids, 'BatchDeleteAttributes', $params, $delete))
                        ;
                }
 
index 4d145fcb16e34486769b4b8b47f3ba0193cd9043..c373a2bd20bc0a2f99214b35b7c0b45d1bf85a47 100644 (file)
@@ -8,14 +8,14 @@
 * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
 */
 class AdminerJsonColumn {
-       private function _testJson($value) {
+       private function testJson($value) {
                if ((substr($value, 0, 1) == '{' || substr($value, 0, 1) == '[') && ($json = json_decode($value, true))) {
                        return $json;
                }
                return $value;
        }
 
-       private function _buildTable($json) {
+       private function buildTable($json) {
                echo '<table style="margin:2px; font-size:100%;">';
                foreach ($json as $key => $val) {
                        echo '<tr>';
@@ -31,7 +31,7 @@ class AdminerJsonColumn {
                                }
                                echo '<code class="jush-js">' . $val . '</code>';
                        } else {
-                               $this->_buildTable($val);
+                               $this->buildTable($val);
                        }
                        echo '</td>';
                        echo '</tr>';
@@ -40,9 +40,9 @@ class AdminerJsonColumn {
        }
 
        function editInput($table, $field, $attrs, $value) {
-               $json = $this->_testJson($value);
+               $json = $this->testJson($value);
                if ($json !== $value) {
-                       $this->_buildTable($json);
+                       $this->buildTable($json);
                }
        }
 }
index 551a15f7f40c34ac3bc2d8de94f6e86d5b7f9911..aa3cb6dbb79ae29bcb98ee1d8d18f608582ee68c 100644 (file)
@@ -25,11 +25,11 @@ class AdminerPlugin extends Adminer\Adminer {
                //! it is possible to use ReflectionObject to find out which plugins defines which methods at once
        }
 
-       function _callParent($function, $args) {
+       private function callParent($function, $args) {
                return call_user_func_array(array('parent', $function), $args);
        }
 
-       function _applyPlugin($function, $args) {
+       private function applyPlugin($function, $args) {
                foreach ($this->plugins as $plugin) {
                        if (method_exists($plugin, $function)) {
                                switch (count($args)) { // call_user_func_array() doesn't work well with references
@@ -62,11 +62,11 @@ class AdminerPlugin extends Adminer\Adminer {
                                }
                        }
                }
-               return $this->_callParent($function, $args);
+               return $this->callParent($function, $args);
        }
 
-       function _appendPlugin($function, $args) {
-               $return = $this->_callParent($function, $args);
+       private function appendPlugin($function, $args) {
+               $return = $this->callParent($function, $args);
                foreach ($this->plugins as $plugin) {
                        if (method_exists($plugin, $function)) {
                                $value = call_user_func_array(array($plugin, $function), $args);
@@ -82,333 +82,333 @@ class AdminerPlugin extends Adminer\Adminer {
 
        function dumpFormat() {
                $args = func_get_args();
-               return $this->_appendPlugin(__FUNCTION__, $args);
+               return $this->appendPlugin(__FUNCTION__, $args);
        }
 
        function dumpOutput() {
                $args = func_get_args();
-               return $this->_appendPlugin(__FUNCTION__, $args);
+               return $this->appendPlugin(__FUNCTION__, $args);
        }
 
        function editRowPrint($table, $fields, $row, $update) {
                $args = func_get_args();
-               return $this->_appendPlugin(__FUNCTION__, $args);
+               return $this->appendPlugin(__FUNCTION__, $args);
        }
 
        function editFunctions($field) {
                $args = func_get_args();
-               return $this->_appendPlugin(__FUNCTION__, $args);
+               return $this->appendPlugin(__FUNCTION__, $args);
        }
 
        // applyPlugin
 
        function name() {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function credentials() {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function connectSsl() {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function permanentLogin($create = false) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function bruteForceKey() {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function serverName($server) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function database() {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function schemas() {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function databases($flush = true) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function queryTimeout() {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function headers() {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function csp() {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function head() {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function css() {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function loginForm() {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function loginFormField($name, $heading, $value) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function login($login, $password) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function tableName($tableStatus) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function fieldName($field, $order = 0) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function selectLinks($tableStatus, $set = "") {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function foreignKeys($table) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function backwardKeys($table, $tableName) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function backwardKeysPrint($backwardKeys, $row) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function selectQuery($query, $start, $failed = false) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function sqlCommandQuery($query) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function rowDescription($table) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function rowDescriptions($rows, $foreignKeys) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function selectLink($val, $field) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function selectVal($val, $link, $field, $original) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function editVal($val, $field) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function tableStructurePrint($fields) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function tableIndexesPrint($indexes) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function selectColumnsPrint($select, $columns) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function selectSearchPrint($where, $columns, $indexes) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function selectOrderPrint($order, $columns, $indexes) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function selectLimitPrint($limit) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function selectLengthPrint($text_length) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function selectActionPrint($indexes) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function selectCommandPrint() {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function selectImportPrint() {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function selectEmailPrint($emailFields, $columns) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function selectColumnsProcess($columns, $indexes) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function selectSearchProcess($fields, $indexes) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function selectOrderProcess($fields, $indexes) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function selectLimitProcess() {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function selectLengthProcess() {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function selectEmailProcess($where, $foreignKeys) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function selectQueryBuild($select, $where, $group, $order, $limit, $page) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function messageQuery($query, $time, $failed = false) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function editInput($table, $field, $attrs, $value) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function editHint($table, $field, $value) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function processInput($field, $value, $function = "") {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function dumpDatabase($db) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function dumpTable($table, $style, $is_view = 0) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function dumpData($table, $style, $query) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function dumpFilename($identifier) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function dumpHeaders($identifier, $multi_table = false) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function importServerPath() {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function homepage() {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function navigation($missing) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function databasesPrint($missing) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 
        function tablesPrint($tables) {
                $args = func_get_args();
-               return $this->_applyPlugin(__FUNCTION__, $args);
+               return $this->applyPlugin(__FUNCTION__, $args);
        }
 }
index 01d63077ebddd5fed5c025c99e3579323859a877..f814276fec143598536a892cf3266769810598ca 100644 (file)
@@ -10,7 +10,7 @@ class AdminerPrettyJsonColumn {
                $this->adminer = $adminer;
        }
 
-       private function _testJson($value) {
+       private function testJson($value) {
                if ((substr($value, 0, 1) == '{' || substr($value, 0, 1) == '[') && ($json = json_decode($value, true))) {
                        return $json;
                }
@@ -18,7 +18,7 @@ class AdminerPrettyJsonColumn {
        }
 
        function editInput($table, $field, $attrs, $value) {
-               $json = $this->_testJson($value);
+               $json = $this->testJson($value);
                if ($json !== $value) {
                        $jsonText = json_encode($json, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
                        return <<<HTML
@@ -30,7 +30,7 @@ HTML;
 
        function processInput($field, $value, $function = '') {
                if ($function === '') {
-                       $json = $this->_testJson($value);
+                       $json = $this->testJson($value);
                        if ($json !== $value) {
                                $value = json_encode($json);
                        }
index 8e6322254dc1d6b9ed9a61203eef8a1c4229d677..5927b42f0dd46d46571f6b20ed403773fe6b2be6 100644 (file)
@@ -17,14 +17,14 @@ class AdminerSqlLog {
        }
 
        function messageQuery($query, $time, $failed = false) {
-               $this->_log($query);
+               $this->log($query);
        }
 
        function sqlCommandQuery($query) {
-               $this->_log($query);
+               $this->log($query);
        }
 
-       function _log($query) {
+       private function log($query) {
                if ($this->filename == "") {
                        $adminer = Adminer\adminer();
                        $this->filename = $adminer->database() . ".sql"; // no database goes to ".sql" to avoid collisions
index 6d2561fbbe1af9a45b62457dbed3088345e83a32..97144b670f742f1df7ddab0d7b11e373e2e78c48 100644 (file)
@@ -18,7 +18,7 @@ CREATE TABLE translation (
 */
 class AdminerTranslation {
 
-       function _translate($idf) {
+       private function translate($idf) {
                static $translations, $lang;
                if ($lang === null) {
                        $lang = Adminer\get_lang();
@@ -39,16 +39,16 @@ class AdminerTranslation {
        }
 
        function tableName(&$tableStatus) {
-               $tableStatus["Comment"] = $this->_translate($tableStatus["Comment"]);
+               $tableStatus["Comment"] = $this->translate($tableStatus["Comment"]);
        }
 
        function fieldName(&$field, $order = 0) {
-               $field["comment"] = $this->_translate($field["comment"]);
+               $field["comment"] = $this->translate($field["comment"]);
        }
 
        function editVal(&$val, $field) {
                if ($field["type"] == "enum") {
-                       $val = $this->_translate($val);
+                       $val = $this->translate($val);
                }
        }
 }