From 5897dfa4c37d6a44bcde5dc7569c8b0d30f21b84 Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Sun, 17 May 2009 22:06:08 -0400 Subject: Refactored new sections code to proper classes and added notice link to links in notice sections. --- classes/Notice.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/Notice.php b/classes/Notice.php index 30508070e..f6ac4f780 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -134,7 +134,7 @@ class Notice extends Memcached_DataObject return _('Too many notices too fast; take a breather and post again in a few minutes.'); } - if (common_config('site', 'dupelimit') > 0 && !Notice::checkDupes($profile_id, $final)) { + if (common_config('site', 'dupelimit') > 0 && !Notice::checkDupes($profile_id, $content)) { common_log(LOG_WARNING, 'Dupe posting by profile #' . $profile_id . '; throttled.'); return _('Too many duplicate messages too quickly; take a breather and post again in a few minutes.'); } @@ -278,8 +278,8 @@ class Notice extends Memcached_DataObject } function hasAttachments() { - $post = clone($this); - $query = "select count(file_id) as n_attachments from file join file_to_post on (file_id = file.id) join notice on (post_id = notice.id) where post_id = " . $post->escape($this->id); + $post = clone $this; + $query = "select count(file_id) as n_attachments from file join file_to_post on (file_id = file.id) join notice on (post_id = notice.id) where post_id = " . $post->escape($post->id); $post->query($query); $post->fetch(); $n_attachments = intval($post->n_attachments); -- cgit v1.2.3-54-g00ecf