diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2011-04-23 07:46:38 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2011-04-23 07:46:38 -0700 |
commit | 0ec819d38161ead063c4dbd953b4b55a33a42f80 (patch) | |
tree | 85c85738821ed643fb3d3762faae79b0f9894f45 | |
parent | 9dd91b55b03923ef3058fb965b0c927d101a396f (diff) |
Insure that the tag count to display is always greater than 0. Refixes #1649.
-rw-r--r-- | modules/tag/helpers/tag.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php index 742783d1..c21104ee 100644 --- a/modules/tag/helpers/tag.php +++ b/modules/tag/helpers/tag.php @@ -48,7 +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; + $count = max($count, 1); return ORM::factory("tag") ->order_by("count", "DESC") ->limit($count) |