aboutsummaryrefslogtreecommitdiffstats
path: root/include/enotify.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-02-29 19:23:01 -0800
committerfriendica <info@friendica.com>2012-02-29 19:23:01 -0800
commitbd2c8c92f1b30d8f811bd4aab0fe3a2c5496ec61 (patch)
tree951a691592d7a52a85267da7aba9c2d8e15a53bd /include/enotify.php
parentbbebb4c2a050f22e9aa51cb123359b169bcb3b3c (diff)
downloadvolse-hubzilla-bd2c8c92f1b30d8f811bd4aab0fe3a2c5496ec61.tar.gz
volse-hubzilla-bd2c8c92f1b30d8f811bd4aab0fe3a2c5496ec61.tar.bz2
volse-hubzilla-bd2c8c92f1b30d8f811bd4aab0fe3a2c5496ec61.zip
yet more work on notifications
Diffstat (limited to 'include/enotify.php')
-rwxr-xr-xinclude/enotify.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/enotify.php b/include/enotify.php
index 80cb7d8fa..a505f1f04 100755
--- a/include/enotify.php
+++ b/include/enotify.php
@@ -25,11 +25,8 @@ function notification($params) {
$title = $body = '';
}
- if($params['otype'] === 'item')
- $possess_desc = t('%s post');
- if($params['otype'] == 'photo')
- $possess_desc = t('%s photo');
-
+ // e.g. "your post", "David's photo", etc.
+ $possess_desc = t('%s <!item_type!>');
if($params['type'] == NOTIFY_MAIL) {
@@ -60,10 +57,16 @@ function notification($params) {
);
}
+ $possess_desc = str_replace('<!item_type!>',item_post_type($p[0]),$possess_desc);
+
+ // "a post"
$dest_str = sprintf($possess_desc,'a');
+
+ // "George Bull's post"
if($p)
$dest_str = sprintf($possess_desc,sprintf( t("%s's"),$p[0]['author-name']));
+ // "your post"
if($p[0]['owner-name'] == $p[0]['author-name'] && $p[0]['wall'])
$dest_str = sprintf($possess_desc, t('your') );