From d00942cce185e24e5d67a1e2ccb92faf5be7d1d4 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 9 Apr 2010 11:36:51 -0700 Subject: Fix for conversation check in @-reply notification email; i18n cleanup on mail messages: fixed some bad gettext usage, added trans doc comments. --- classes/Notice.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'classes') diff --git a/classes/Notice.php b/classes/Notice.php index b416e2ff2..998e9c92b 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -699,6 +699,27 @@ class Notice extends Memcached_DataObject return $ids; } + /** + * Is this notice part of an active conversation? + * + * @return boolean true if other messages exist in the same + * conversation, false if this is the only one + */ + function hasConversation() + { + if (!empty($this->conversation)) { + $conversation = Notice::conversationStream( + $this->conversation, + 1, + 1 + ); + if ($conversation->N > 0) { + return true; + } + } + return false; + } + /** * @param $groups array of Group *objects* * @param $recipients array of profile *ids* -- cgit v1.2.3-54-g00ecf