[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

@@ -322,8 +322,11 @@ require_once './libraries/List.class.php';
'disp_name_cut' => $disp_name_cut,
'disp_name' => $disp_name,
'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)
return $dbgroups;
}
@@ -379,7 +382,10 @@ require_once './libraries/List.class.php';
} else {
$return .= htmlspecialchars($db['disp_name']);
}
$return .= ' (' . $db['num_tables'] . ')';
if (! empty($db['num_tables'])) {
$return .= ' (' . $db['num_tables'] . ')';
}
$return .= '</a></li>' . "\n";
}
if (count($dbs) > 1) {