From fb02e00134f2168cff914aad91308bc59b150dd2 Mon Sep 17 00:00:00 2001 From: Andreas Brachold Date: Sun, 28 Oct 2007 11:14:45 +0000 Subject: * Fix statement --- contrib/popularity/t10.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/popularity/t10.php b/contrib/popularity/t10.php index 0aaf6db..cf13983 100644 --- a/contrib/popularity/t10.php +++ b/contrib/popularity/t10.php @@ -335,8 +335,8 @@ function getTopTen($k,$l) { return 0; } - if((int)$l <= 0) { - $l = 10; + if((int)$l <= 1) { + $l = 1; } if((int)$l >= 1000) { $l = 1000; @@ -344,7 +344,7 @@ function getTopTen($k,$l) { $query = "SELECT id, AVG(level) as l, COUNT(*) as c, AVG(level)*COUNT(*) as r" . " FROM #__popularity" - . " GROUP BY id ORDER by rank DESC LIMIT " . (int) $l + . " GROUP BY id ORDER by r DESC LIMIT " . (int) $l ; $database->setQuery( $query ); $rows = $database->loadObjectList(); -- cgit v1.2.3