diff --git a/design.inc.php b/design.inc.php
index a4fedcf3..8facaebe 100644
--- a/design.inc.php
+++ b/design.inc.php
@@ -9,7 +9,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
-
+
diff --git a/select.inc.php b/select.inc.php
index 4ee849f4..facbff13 100644
--- a/select.inc.php
+++ b/select.inc.php
@@ -51,7 +51,7 @@ $order = array();
foreach ((array) $_GET["order"] as $key => $val) {
if (in_array($val, $columns, true)) {
$order[] = idf_escape($val) . (isset($_GET["desc"][$key]) ? " DESC" : "");
- } elseif (preg_match('(^(' . strtoupper(implode('|', $functions) . '|' . implode('|', $grouping)) . ')\\((' . implode('|', array_map('preg_quote', array_map('idf_escape', $columns))) . ')\\)$)', $val)) {
+ } elseif (preg_match('(^(COUNT\\(\\*\\)|(' . strtoupper(implode('|', $functions) . '|' . implode('|', $grouping)) . ')\\((' . implode('|', array_map('preg_quote', array_map('idf_escape', $columns))) . ')\\))$)', $val)) {
$order[] = $val . (isset($_GET["desc"][$key]) ? " DESC" : "");
}
}