From 938a999ab0df02a59446e5e74a0715f8fa40a34b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 5 Jan 2011 08:32:16 +0000 Subject: [PATCH] * dont give sql error in gathering statistic data, if table does not exists (eg. Gallery is not installed) --- admin/inc/class.admin_statistics.inc.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/admin/inc/class.admin_statistics.inc.php b/admin/inc/class.admin_statistics.inc.php index 1f8dd3c289..11d8654115 100644 --- a/admin/inc/class.admin_statistics.inc.php +++ b/admin/inc/class.admin_statistics.inc.php @@ -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
\n"; + try { + $entries = (int)$GLOBALS['egw']->db->query('SELECT COUNT(*) FROM '.$table)->fetchColumn(); + //echo "$app ($table): $entries
\n"; + } + catch(egw_exception_db $e) { + $entries = null; + } } return $entries; }