]> git.joonet.de Git - adminer.git/commitdiff
Allow order by COUNT(*)
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Wed, 27 Aug 2008 14:34:21 +0000 (14:34 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Wed, 27 Aug 2008 14:34:21 +0000 (14:34 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@458 7c3ca157-0c34-0410-bff1-cbf682f78f5c

design.inc.php
select.inc.php

index a4fedcf38e67042b2a73d5ca1bd61a7ccc2cf4dd..8facaebe8ff73e4bfa52ffdad772d2cdd8838589 100644 (file)
@@ -9,7 +9,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta http-equiv="Content-Script-Type" content="text/javascript" />
 <meta name="robots" content="noindex" />
-<title><?php echo $title . (strlen($title2) ? ": " . htmlspecialchars($title2) : "") . " - " . lang('phpMinAdmin') . " 1.7.0-dev"; ?></title>
+<title><?php echo $title . (strlen($title2) ? ": " . htmlspecialchars($title2) : "") . " - " . lang('phpMinAdmin') . " 1.7.1-dev"; ?></title>
 <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
 <link rel="stylesheet" type="text/css" href="default.css" /><?php // Ondrej Valka, http://valka.info ?>
 <?php if ($_COOKIE["highlight"] == "jush") { ?>
index 4ee849f4d2f0890fec504dfd2178eedc1f363a61..facbff1333528a1d66a3367e8cef5ac4487f4b50 100644 (file)
@@ -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" : "");
        }
 }