Skip to content

Commit

Permalink
Protected methods should not be prefixed with underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
madhuracj committed Jun 2, 2012
1 parent fce6814 commit 5a64005
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions libraries/List_Database.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function __construct($db_link_user = null, $db_link_control = null)
*
* @return void
*/
protected function _checkHideDatabase()
protected function checkHideDatabase()
{
if (empty($GLOBALS['cfg']['Server']['hide_db'])) {
return;
Expand All @@ -104,7 +104,7 @@ protected function _checkHideDatabase()
* @return array
* @todo we could also search mysql tables if all fail?
*/
protected function _retrieve($like_db_name = null)
protected function retrieve($like_db_name = null)
{
if ($this->show_databases_disabled) {
return array();
Expand Down Expand Up @@ -162,20 +162,20 @@ protected function _retrieve($like_db_name = null)
*/
public function build()
{
if (! $this->_checkOnlyDatabase()) {
$items = $this->_retrieve();
if (! $this->checkOnlyDatabase()) {
$items = $this->retrieve();
$this->exchangeArray($items);
}

$this->_checkHideDatabase();
$this->checkHideDatabase();
}

/**
* checks the only_db configuration
*
* @return boolean false if there is no only_db, otherwise true
*/
protected function _checkOnlyDatabase()
protected function checkOnlyDatabase()
{
if (is_string($GLOBALS['cfg']['Server']['only_db'])
&& strlen($GLOBALS['cfg']['Server']['only_db'])
Expand All @@ -195,7 +195,7 @@ protected function _checkOnlyDatabase()
if ($each_only_db === '*' && ! $this->show_databases_disabled) {
// append all not already listed dbs to the list
$items = array_merge(
$items, array_diff($this->_retrieve(), $items)
$items, array_diff($this->retrieve(), $items)
);
// there can only be one '*', and this can only be last
break;
Expand All @@ -210,7 +210,7 @@ protected function _checkOnlyDatabase()
}

if (! $this->show_databases_disabled) {
$items = array_merge($items, $this->_retrieve($each_only_db));
$items = array_merge($items, $this->retrieve($each_only_db));
continue;
}

Expand Down Expand Up @@ -441,7 +441,7 @@ public function getHtmlSelectGrouped($selected = '', $offset = 0, $count = 0)
* @deprecated
* @return void
*/
protected function _checkAgainstPrivTables()
protected function checkAgainstPrivTables()
{
// 1. get allowed dbs from the "mysql.db" table
// User can be blank (anonymous user)
Expand Down

0 comments on commit 5a64005

Please sign in to comment.