diff --git a/api/src/Storage/History.php b/api/src/Storage/History.php index 0ed5db8b36..f6bf66a8bf 100644 --- a/api/src/Storage/History.php +++ b/api/src/Storage/History.php @@ -279,10 +279,7 @@ class History } $rows[] = Api\Db::strip_array_keys($row,'history_'); } - if ($mysql_calc_rows) - { - $total = $GLOBALS['egw']->db->query('SELECT FOUND_ROWS()')->fetchColumn(); - } + $total = $GLOBALS['egw']->db->union($_query,__LINE__,__FILE__)->NumRows(); return $total; }