From 25ad620bb0790e0547f45a76837698ce63960d48 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 21 Dec 2013 23:37:55 +0100 Subject: [PATCH] Server: sort applications and packages --- server/xprivacy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/xprivacy.php b/server/xprivacy.php index 8060c8e8f..79edee805 100644 --- a/server/xprivacy.php +++ b/server/xprivacy.php @@ -355,7 +355,7 @@ function confidence($restricted, $not_restricted) { $sql = "SELECT DISTINCT package_name, package_version, package_version_code"; $sql .= " FROM xprivacy_app"; $sql .= " WHERE application_name IN (" . implode(',', $apps) . ")"; - $sql .= " ORDER BY package_name"; + $sql .= " ORDER BY package_name, package_version"; $result = $db->query($sql); if ($result) { while (($row = $result->fetch_object())) { @@ -457,7 +457,7 @@ function confidence($restricted, $not_restricted) { $sql .= " WHERE application_name REGEXP '^[^a-zA-Z]'"; else $sql .= " WHERE application_name LIKE '" . ($letter == '%' ? '\\' : '') . $db->real_escape_string($letter) . "%'"; - $sql .= " ORDER BY application_name"; + $sql .= " ORDER BY application_name, package_name"; $result = $db->query($sql); if ($result) { while (($row = $result->fetch_object())) {