diff options
author | Brion Vibber <brion@pobox.com> | 2010-04-09 11:36:51 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-04-09 11:56:27 -0700 |
commit | d00942cce185e24e5d67a1e2ccb92faf5be7d1d4 (patch) | |
tree | 2c4e21be55482a29c64e91353c9e755e79c71c3a /classes/Notice.php | |
parent | 9cfc5c0f5ad248a8b594f95a8bcbe5adfdbf6925 (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.php | 21 |
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* */ |