diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2014-06-24 19:34:36 +0200 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2014-06-24 19:34:36 +0200 |
commit | b8dc9e855af2d30f33d0f90dc13d8cad0a7b3e70 (patch) | |
tree | 718df6305bcb82c8dcb4b287a7132422e748cdfb /include/notify.php | |
parent | c2d520f1be115fb3cb5da2a35eb10146cecee8aa (diff) | |
parent | a92fb0b04c3e6474ec48faf8e4cc65c382e89d66 (diff) | |
download | volse-hubzilla-b8dc9e855af2d30f33d0f90dc13d8cad0a7b3e70.tar.gz volse-hubzilla-b8dc9e855af2d30f33d0f90dc13d8cad0a7b3e70.tar.bz2 volse-hubzilla-b8dc9e855af2d30f33d0f90dc13d8cad0a7b3e70.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/notify.php')
-rw-r--r-- | include/notify.php | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/include/notify.php b/include/notify.php index 9517e06dc..aa96fa279 100644 --- a/include/notify.php +++ b/include/notify.php @@ -1,4 +1,4 @@ -<?php +<?php /** @file */ function format_notification($item) { @@ -15,20 +15,19 @@ function format_notification($item) { localize_item($item); -// FIXME - we may need the parent - - if(! $item['localize']) { + if($item_localize) { + $itemem_text = $item['localize']; + } + else { $itemem_text = (($item['item_flags'] & ITEM_THREAD_TOP) - ? sprintf( t("%s created a new post"), $item['author']['xchan_name']) - : sprintf( t("%s commented on %s's post"), $item['author']['xchan_name'], $item['pname'])); + ? t('created a new post') + : sprintf( t('commented on %s\'s post'), $item['owner']['xchan_name'])); } - else - $itemem_text = $item['localize']; // convert this logic into a json array just like the system notifications return array( - 'notify_link' => z_root() . '/notify/view_item/' . $item['id'], + 'notify_link' => $item['llink'], 'name' => $item['author']['xchan_name'], 'url' => $item['author']['xchan_url'], 'photo' => $item['author']['xchan_photo_s'], |