From 579332aa247140d4da720b6c756c97bffdbf955d Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 7 Apr 2009 23:57:45 -0400 Subject: don't use count() to check for empty page --- actions/publictagcloud.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'actions/publictagcloud.php') diff --git a/actions/publictagcloud.php b/actions/publictagcloud.php index 0cd8940d4..855cfed9b 100644 --- a/actions/publictagcloud.php +++ b/actions/publictagcloud.php @@ -62,12 +62,10 @@ class PublictagcloudAction extends Action $this->element('p', 'instructions', sprintf(_('These are most popular recent tags on %s '), common_config('site', 'name'))); + } - $tags = new Notice_tag; - if ($tags->count()) { - return; - } - + function showEmptyList() + { $message = _('No one has posted a notice with a [hashtag](%%doc.tags%%) yet.') . ' '; if (common_logged_in()) { @@ -144,6 +142,8 @@ class PublictagcloudAction extends Action $this->elementEnd('dd'); $this->elementEnd('dl'); $this->elementEnd('div'); + } else { + $this->showEmptyList(); } } -- cgit v1.2.3-54-g00ecf