diff options
| author | Andreas Brachold <vdr07@deltab.de> | 2007-10-28 11:14:45 +0000 |
|---|---|---|
| committer | Andreas Brachold <vdr07@deltab.de> | 2007-10-28 11:14:45 +0000 |
| commit | fb02e00134f2168cff914aad91308bc59b150dd2 (patch) | |
| tree | 63684dcf217985d048de5a9788dd0255a18bb33c | |
| parent | 5c128ede4d18af31bdbb5de983bc4949f908ee36 (diff) | |
| download | xxv-fb02e00134f2168cff914aad91308bc59b150dd2.tar.gz xxv-fb02e00134f2168cff914aad91308bc59b150dd2.tar.bz2 | |
* Fix statement
| -rw-r--r-- | contrib/popularity/t10.php | 6 |
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(); |
