* dont give sql error in gathering statistic data, if table does not exists (eg. Gallery is not installed)

This commit is contained in:
Ralf Becker 2011-01-05 08:32:16 +00:00
parent 6e8e8a8986
commit 938a999ab0

View File

@ -276,8 +276,13 @@ return true;";
);
if (($table = $app2table[$app]))
{
$entries = (int)$GLOBALS['egw']->db->query('SELECT COUNT(*) FROM '.$table)->fetchColumn();
//echo "$app ($table): $entries<br />\n";
try {
$entries = (int)$GLOBALS['egw']->db->query('SELECT COUNT(*) FROM '.$table)->fetchColumn();
//echo "$app ($table): $entries<br />\n";
}
catch(egw_exception_db $e) {
$entries = null;
}
}
return $entries;
}