[config] new parameter $cfg['Servers'][$i]['CountTables'] = true; set to false for speed improvements with many databases

This commit is contained in:
Sebastian Mendel
2008-01-29 13:46:05 +00:00
parent f9b68767e2
commit 10cf3d2c7d
3 changed files with 16 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
+ [lang] Finnish update, thanks to Jouni Kahkonen + [lang] Finnish update, thanks to Jouni Kahkonen
+ [config] new parameter $cfg['CheckConfigurationPermissions'] + [config] new parameter $cfg['CheckConfigurationPermissions']
+ [config] new parameter $cfg['Servers'][$i]['ShowDatabasesCommand'] + [config] new parameter $cfg['Servers'][$i]['ShowDatabasesCommand']
+ [config] new parameter $cfg['Servers'][$i]['CountTables']
+ rfe #1775288 [transformation] proper display if IP-address stored as INT + rfe #1775288 [transformation] proper display if IP-address stored as INT
+ rfe #1758177 [core] Add the Geometry DataTypes + rfe #1758177 [core] Add the Geometry DataTypes
+ rfe #1741101, patch #1798184 UUID default for CHAR(36) PRIMARY KEY, + rfe #1741101, patch #1798184 UUID default for CHAR(36) PRIMARY KEY,

View File

@@ -322,8 +322,11 @@ require_once './libraries/List.class.php';
'disp_name_cut' => $disp_name_cut, 'disp_name_cut' => $disp_name_cut,
'disp_name' => $disp_name, 'disp_name' => $disp_name,
'comment' => $db_tooltip, 'comment' => $db_tooltip,
'num_tables' => PMA_getTableCount($db),
); );
if ($GLOBALS['cfg']['Server']['CountTables']) {
$dbgroups[$group][$db]['num_tables'] = PMA_getTableCount($db);
}
} // end foreach ($GLOBALS['PMA_List_Database']->items as $db) } // end foreach ($GLOBALS['PMA_List_Database']->items as $db)
return $dbgroups; return $dbgroups;
} }
@@ -379,7 +382,10 @@ require_once './libraries/List.class.php';
} else { } else {
$return .= htmlspecialchars($db['disp_name']); $return .= htmlspecialchars($db['disp_name']);
} }
$return .= ' (' . $db['num_tables'] . ')';
if (! empty($db['num_tables'])) {
$return .= ' (' . $db['num_tables'] . ')';
}
$return .= '</a></li>' . "\n"; $return .= '</a></li>' . "\n";
} }
if (count($dbs) > 1) { if (count($dbs) > 1) {

View File

@@ -354,6 +354,13 @@ $cfg['Servers'][$i]['AllowDeny']['rules'] = array();
*/ */
$cfg['Servers'][$i]['ShowDatabasesCommand'] = 'SHOW DATABASES'; $cfg['Servers'][$i]['ShowDatabasesCommand'] = 'SHOW DATABASES';
/**
* Whether to count tables when showing database list
*
* @global array $cfg['Servers'][$i]['CountTables']
*/
$cfg['Servers'][$i]['CountTables'] = true;
/** /**
* Default server (0 = no default server) * Default server (0 = no default server)
* *