diff --git a/ChangeLog b/ChangeLog
index e30bff0b26..7a0d9a7aec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,7 @@ phpMyAdmin - ChangeLog
- bug #3924 Show warning when CSV file does not contain data for all columns
- bug #3947 Missing Sql Query after modify structure
- bug #3948 Server export problems
+- bug #3917 CountTables directive is deprecated
4.0.1.0 (2013-05-14)
- bug #3879 Import broken for CSV using LOAD DATA
diff --git a/doc/config.rst b/doc/config.rst
index 7087ecf243..4e872ffc34 100644
--- a/doc/config.rst
+++ b/doc/config.rst
@@ -915,14 +915,6 @@ Server connection settings
* ``'SELECT SCHEMA_NAME FROM information_schema.SCHEMATA'``
* ``false``
-.. config:option:: $cfg['Servers'][$i]['CountTables']
-
- :type: boolean
- :default: false
-
- Whether to count the number of tables for each database when preparing
- the list of databases for the navigation panel.
-
.. config:option:: $cfg['Servers'][$i]['SignonScript']
:type: string
diff --git a/libraries/List_Database.class.php b/libraries/List_Database.class.php
index 39b121985b..f2902e1ae3 100644
--- a/libraries/List_Database.class.php
+++ b/libraries/List_Database.class.php
@@ -229,200 +229,6 @@ class PMA_List_Database extends PMA_List
return $this->getEmpty();
}
- /**
- * returns array with dbs grouped with extended infos
- *
- * @param integer $offset
- * @param integer $count
- *
- * @return array db list
- */
- public function getGroupedDetails($offset, $count)
- {
- $dbgroups = array();
-
- if ($GLOBALS['cfg']['ShowTooltip']
- && $GLOBALS['cfgRelation']['commwork']
- ) {
- $db_tooltips = PMA_getDbComments();
- }
-
- if (!$GLOBALS['cfg']['NavigationTreeEnableGrouping']) {
- $separators = array();
- } elseif (is_array($GLOBALS['cfg']['NavigationTreeDbSeparator'])) {
- $separators = $GLOBALS['cfg']['NavigationTreeDbSeparator'];
- } elseif (!empty($GLOBALS['cfg']['NavigationTreeDbSeparator'])) {
- $separators = array($GLOBALS['cfg']['NavigationTreeDbSeparator']);
- } else {
- $separators = array();
- }
-
- foreach ($this->getLimitedItems($offset, $count) as $db) {
- // Get comments from PMA comments table
- $db_tooltip = '';
-
- if (isset($db_tooltips[$db])) {
- $db_tooltip = $db_tooltips[$db];
- }
-
- $pos = false;
-
- foreach ($separators as $separator) {
- // use strpos instead of strrpos; it seems more common to
- // have the db name, the separator, then the rest which
- // might contain a separator
- // like dbname_the_rest
- $pos = strpos($db, $separator, 1);
-
- if ($pos !== false) {
- break;
- }
- }
-
- if ($pos !== false) {
- $group = substr($db, 0, $pos);
- $disp_name_cut = substr($db, $pos);
- } else {
- $group = $db;
- $disp_name_cut = $db;
- }
-
- $disp_name = $db;
-
- $dbgroups[$group][$db] = array(
- 'name' => $db,
- 'disp_name_cut' => $disp_name_cut,
- 'disp_name' => $disp_name,
- 'comment' => $db_tooltip,
- );
-
- if ($GLOBALS['cfg']['Server']['CountTables']) {
- $dbgroups[$group][$db]['num_tables'] = PMA_getTableCount($db);
- }
- } // end foreach ($GLOBALS['PMA_List_Database']->items as $db)
- return $dbgroups;
- }
-
- /**
- * returns a part of the items
- *
- * @param integer $offset
- * @param integer $count
- *
- * @return array some items
- */
- public function getLimitedItems($offset, $count)
- {
- return array_slice($this->getArrayCopy(), $offset, $count);
- }
-
- /**
- * returns html code for list with dbs
- *
- * @return string html code list
- */
- public function getHtmlListGrouped($selected = '', $offset = 0, $count = 0)
- {
- if (true === $selected) {
- $selected = $this->getDefault();
- }
-
- $return = '
' . "\n";
- foreach ($this->getGroupedDetails($offset, $count) as $group => $dbs) {
- if (count($dbs) > 1) {
- $return .= '- ' . htmlspecialchars($group)
- . '
' . "\n";
- // whether display db_name cut by the group part
- $cut = true;
- } else {
- // .. or full
- $cut = false;
- }
- foreach ($dbs as $db) {
- $return .= '- ';
- if ($cut) {
- $return .= htmlspecialchars($db['disp_name_cut']);
- } else {
- $return .= htmlspecialchars($db['disp_name']);
- }
-
- if (! empty($db['num_tables'])) {
- $return .= ' (' . $db['num_tables'] . ')';
- }
- $return .= '
' . "\n";
- }
- if (count($dbs) > 1) {
- $return .= '
' . "\n";
- }
- }
- $return .= '
';
-
- return $return;
- }
-
- /**
- * returns html code for select form element with dbs
- *
- * @todo IE can not handle different text directions in select boxes so,
- * as mostly names will be in english, we set the whole selectbox to LTR
- * and EN
- *
- * @return string html code select
- */
- public function getHtmlSelectGrouped($selected = '', $offset = 0, $count = 0)
- {
- if (true === $selected) {
- $selected = $this->getDefault();
- }
-
- $return = '';
-
- return $return;
- }
-
/**
* this is just a backup, if all is fine this can be deleted later
*
diff --git a/libraries/config.default.php b/libraries/config.default.php
index 2d4c89baf0..ed306b6be3 100644
--- a/libraries/config.default.php
+++ b/libraries/config.default.php
@@ -469,13 +469,6 @@ $cfg['Servers'][$i]['DisableIS'] = true;
*/
$cfg['Servers'][$i]['ShowDatabasesCommand'] = 'SHOW DATABASES';
-/**
- * Whether to count tables when showing database list
- *
- * @global array $cfg['Servers'][$i]['CountTables']
- */
-$cfg['Servers'][$i]['CountTables'] = false;
-
/**
* Whether the tracking mechanism creates
* versions for tables and views automatically.
diff --git a/libraries/config/messages.inc.php b/libraries/config/messages.inc.php
index acb0674bc0..9222c64f22 100644
--- a/libraries/config/messages.inc.php
+++ b/libraries/config/messages.inc.php
@@ -386,8 +386,6 @@ $strConfigServers_controluser_desc = __('A special MySQL user configured with li
$strConfigServers_controluser_name = __('Control user');
$strConfigServers_controlhost_desc = __('An alternate host to hold the configuration storage; leave blank to use the already defined host');
$strConfigServers_controlhost_name = __('Control host');
-$strConfigServers_CountTables_desc = __('Count tables when showing database list');
-$strConfigServers_CountTables_name = __('Count tables');
$strConfigServers_designer_coords_desc = __('Leave blank for no Designer support, suggested: [kbd]pma__designer_coords[/kbd]');
$strConfigServers_designer_coords_name = __('Designer table');
$strConfigServers_DisableIS_desc = __('More information on [a@https://sourceforge.net/p/phpmyadmin/bugs/2606/]PMA bug tracker[/a] and [a@http://bugs.mysql.com/19588]MySQL Bugs[/a]');
diff --git a/libraries/config/setup.forms.php b/libraries/config/setup.forms.php
index 5f42688808..1dd665b213 100644
--- a/libraries/config/setup.forms.php
+++ b/libraries/config/setup.forms.php
@@ -60,8 +60,7 @@ $forms['Servers']['Server_config'] = array('Servers' => array(1 => array(
'DisableIS',
'AllowDeny/order',
'AllowDeny/rules',
- 'ShowDatabasesCommand',
- 'CountTables')));
+ 'ShowDatabasesCommand')));
$forms['Servers']['Server_pmadb'] = array('Servers' => array(1 => array(
'pmadb' => 'phpmyadmin',
'controlhost',
diff --git a/test/classes/PMA_List_Database_test.php b/test/classes/PMA_List_Database_test.php
index fa224c616c..76f11b57ab 100644
--- a/test/classes/PMA_List_Database_test.php
+++ b/test/classes/PMA_List_Database_test.php
@@ -55,18 +55,6 @@ class PMA_List_Database_test extends PHPUnit_Framework_TestCase
$this->assertEquals(true, $arr->exists('single_db'));
}
- public function testLimitedItems()
- {
- $arr = new PMA_List_Database;
- $this->assertEquals(array('single_db'), $arr->getLimitedItems(0, 1));
- }
-
- public function testLimitedItems_empty()
- {
- $arr = new PMA_List_Database;
- $this->assertEquals(array(), $arr->getLimitedItems(1, 1));
- }
-
public function testHtmlOptions()
{
$arr = new PMA_List_Database;
@@ -110,43 +98,5 @@ class PMA_List_Database_test extends PHPUnit_Framework_TestCase
);
}
- /**
- * Test for getGroupedDetails
- *
- * @return void
- */
- public function testGetGroupedDetails()
- {
- $GLOBALS['cfg']['ShowTooltip'] = true;
- $GLOBALS['cfgRelation']['commwork'] = true;
- $GLOBALS['server'] = 1;
- $GLOBALS['cfg']['NavigationTreeEnableGrouping'] = true;
- $GLOBALS['cfg']['NavigationTreeDbSeparator'] = array('|',',');
-
- $this->assertEquals(
- $this->object->getGroupedDetails(10, 100),
- array()
- );
- }
-
- /**
- * Test for getHtmlListGrouped
- *
- * @return void
- */
- public function testGetHtmlListGrouped()
- {
- $GLOBALS['cfg']['ShowTooltip'] = true;
- $GLOBALS['cfgRelation']['commwork'] = true;
- $GLOBALS['server'] = 1;
- $GLOBALS['cfg']['NavigationTreeEnableGrouping'] = true;
- $GLOBALS['cfg']['NavigationTreeDbSeparator'] = array('|',',');
-
- $this->assertEquals(
- $this->object->getHtmlListGrouped(true, 5, 5),
- ''
- );
- }
}
?>