summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2016-03-01 18:30:58 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2016-03-01 18:30:58 +0100
commit95140b880b035f07f4545c8421230c25349b45e4 (patch)
treecbb61dd982ea1a6ea0345011925ab6381ae6e6b6
parent6ec4a3589e327ded693ab0c741828fc5ec66b840 (diff)
parent42f5c405c0280b6216028d0513e29c306e388426 (diff)
downloadaur-95140b880b035f07f4545c8421230c25349b45e4.tar.gz
aur-95140b880b035f07f4545c8421230c25349b45e4.tar.xz
Merge branch 'maint'
-rwxr-xr-xscripts/popupdate.py2
-rw-r--r--web/lib/aurjson.class.php1
2 files changed, 1 insertions, 2 deletions
diff --git a/scripts/popupdate.py b/scripts/popupdate.py
index 2aa8a546..f3ba5131 100755
--- a/scripts/popupdate.py
+++ b/scripts/popupdate.py
@@ -22,7 +22,7 @@ cur.execute("UPDATE PackageBases SET NumVotes = (SELECT COUNT(*) FROM " +
"PackageVotes WHERE PackageVotes.PackageBaseID = PackageBases.ID)")
cur.execute("UPDATE PackageBases SET Popularity = (" +
- "SELECT SUM(POWER(0.98, (UNIX_TIMESTAMP() - VoteTS) / 86400)) " +
+ "SELECT COALESCE(SUM(POWER(0.98, (UNIX_TIMESTAMP() - VoteTS) / 86400)), 0.0) " +
"FROM PackageVotes WHERE PackageVotes.PackageBaseID = " +
"PackageBases.ID AND NOT VoteTS IS NULL)")
diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php
index 7f9b5f2e..3bd9179c 100644
--- a/web/lib/aurjson.class.php
+++ b/web/lib/aurjson.class.php
@@ -266,7 +266,6 @@ class AurJSON {
"ON Licenses.ID = PackageLicenses.LicenseID " .
"WHERE ${where_condition} " .
"AND PackageBases.PackagerUID IS NOT NULL " .
- "GROUP BY Packages.ID " .
"LIMIT $max_results";
} elseif ($this->version >= 2) {
if ($this->version == 2 || $this->version == 3) {