From 9dd91b55b03923ef3058fb965b0c927d101a396f Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 23 Apr 2011 07:42:28 -0700 Subject: Insure that the tag count to display is always greater than 1. Refixes #1649. --- modules/tag/helpers/tag.php | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/tag') 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) -- cgit v1.2.3