summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-04-09 11:36:51 -0700
committerBrion Vibber <brion@pobox.com>2010-04-09 12:02:11 -0700
commit6fb60fb57f9ab604e1d77dc846eb48b978c31994 (patch)
treeb7f8c2241a3d77a75179f40be422cd773bd504bb /classes/Notice.php
parentf4ad0acd8450a322d4a5d54b7e8e4baee75de3e5 (diff)
Fix for conversation check in @-reply notification email; i18n cleanup on mail messages: fixed some bad gettext usage, added trans doc comments.
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index b416e2ff2..998e9c92b 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -700,6 +700,27 @@ class Notice extends Memcached_DataObject
}
/**
+ * 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*
*/