* 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:33:49 +00:00
parent a7654640c4
commit ee0b4722b4

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;
}