diff options
author | Robin Millette <millette@controlyourself.ca> | 2009-05-17 22:06:08 -0400 |
---|---|---|
committer | Robin Millette <millette@controlyourself.ca> | 2009-05-17 22:06:08 -0400 |
commit | 5897dfa4c37d6a44bcde5dc7569c8b0d30f21b84 (patch) | |
tree | 6e882a25153ec071b4aa119bfdbd705ff51e2c90 /classes/Notice.php | |
parent | a325144fa0ba769de1cdb554cac04e0116912b66 (diff) |
Refactored new sections code to proper classes and added notice link to links in notice sections.
Diffstat (limited to 'classes/Notice.php')
-rw-r--r-- | classes/Notice.php | 6 |
1 files changed, 3 insertions, 3 deletions
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); |