summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Brachold <vdr07@deltab.de>2007-10-28 11:14:45 +0000
committerAndreas Brachold <vdr07@deltab.de>2007-10-28 11:14:45 +0000
commitfb02e00134f2168cff914aad91308bc59b150dd2 (patch)
tree63684dcf217985d048de5a9788dd0255a18bb33c
parent5c128ede4d18af31bdbb5de983bc4949f908ee36 (diff)
downloadxxv-fb02e00134f2168cff914aad91308bc59b150dd2.tar.gz
xxv-fb02e00134f2168cff914aad91308bc59b150dd2.tar.bz2
* Fix statement
-rw-r--r--contrib/popularity/t10.php6
1 files 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();