summaryrefslogtreecommitdiff
path: root/modules/tag
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2011-04-23 07:42:28 -0700
committerTim Almdal <tnalmdal@shaw.ca>2011-04-23 07:42:28 -0700
commit9dd91b55b03923ef3058fb965b0c927d101a396f (patch)
treed478c5c4c9b533cfaa1a01123e3c2051cc137a18 /modules/tag
parent7a4ff2fea194829eac38c6293b43cfa55d4637e1 (diff)
Insure that the tag count to display is always greater than 1. Refixes #1649.
Diffstat (limited to 'modules/tag')
-rw-r--r--modules/tag/helpers/tag.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php
index 733215b3..742783d1 100644
--- a/modules/tag/helpers/tag.php
+++ b/modules/tag/helpers/tag.php
@@ -48,6 +48,7 @@ class tag_Core {
* @return ORM_Iterator of Tag_Model in descending tag count order
*/
static function popular_tags($count) {
+ $count = $count >= 1 ? $count : 30;
return ORM::factory("tag")
->order_by("count", "DESC")
->limit($count)