Hide fresh package bases from stats and results

Do not show package bases that have just been created in the package
update statistics or in the search results.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2014-12-28 17:44:25 +01:00
parent 9bb93fad75
commit d1df490370
2 changed files with 2 additions and 1 deletions

View file

@ -563,7 +563,7 @@ function pkg_search_page($SID="") {
$q_from_extra = ""; $q_from_extra = "";
} }
$q_where = "WHERE 1 = 1 "; $q_where = 'WHERE PackageBases.PackagerUID IS NOT NULL ';
/* /*
* TODO: Possibly do string matching on category to make request * TODO: Possibly do string matching on category to make request
* variable values more sensible. * variable values more sensible.

View file

@ -14,6 +14,7 @@ function updates_table() {
$q = 'SELECT Packages.Name, Version, ModifiedTS, SubmittedTS '; $q = 'SELECT Packages.Name, Version, ModifiedTS, SubmittedTS ';
$q.= 'FROM Packages INNER JOIN PackageBases ON '; $q.= 'FROM Packages INNER JOIN PackageBases ON ';
$q.= 'Packages.PackageBaseID = PackageBases.ID '; $q.= 'Packages.PackageBaseID = PackageBases.ID ';
$q.= 'WHERE PackageBases.PackagerUID IS NOT NULL ';
$q.= 'ORDER BY ModifiedTS DESC LIMIT 10'; $q.= 'ORDER BY ModifiedTS DESC LIMIT 10';
$result = $dbh->query($q); $result = $dbh->query($q);