diff options
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r-- | Zotlabs/Lib/Config.php | 4 | ||||
-rw-r--r-- | Zotlabs/Lib/Enotify.php | 16 | ||||
-rw-r--r-- | Zotlabs/Lib/ThreadItem.php | 4 |
3 files changed, 17 insertions, 7 deletions
diff --git a/Zotlabs/Lib/Config.php b/Zotlabs/Lib/Config.php index f9f22ba3a..c00b8efb6 100644 --- a/Zotlabs/Lib/Config.php +++ b/Zotlabs/Lib/Config.php @@ -142,9 +142,9 @@ class Config { /** - * @brief Returns a value directly from the database configuration storage. + * @brief Returns a record directly from the database configuration storage. * - * This function queries directly the database and bypasses the chached storage + * This function queries directly the database and bypasses the cached storage * from get_config($family, $key). * * @param string $family diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php index a7b4f28e8..5cf4ec31d 100644 --- a/Zotlabs/Lib/Enotify.php +++ b/Zotlabs/Lib/Enotify.php @@ -794,6 +794,20 @@ class Enotify { : sprintf( t('commented on %s\'s post'), $item['owner']['xchan_name'])); } + $edit = false; + + if($item['edited'] > $item['created']) { + if($item['item_thread_top']) { + $itemem_text = sprintf( t('edited a post dated %s'), relative_date($item['created'])); + $edit = true; + } + else { + $itemem_text = sprintf( t('edited a comment dated %s'), relative_date($item['created'])); + $edit = true; + } + } + + // convert this logic into a json array just like the system notifications return array( @@ -801,7 +815,7 @@ class Enotify { 'name' => $item['author']['xchan_name'], 'url' => $item['author']['xchan_url'], 'photo' => $item['author']['xchan_photo_s'], - 'when' => relative_date($item['created']), + 'when' => relative_date(($edit)? $item['edited'] : $item['created']), 'class' => (intval($item['item_unseen']) ? 'notify-unseen' : 'notify-seen'), 'b64mid' => ((in_array($item['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) ? 'b64.' . base64url_encode($item['thr_parent']) : 'b64.' . base64url_encode($item['mid'])), 'notify_id' => 'undefined', diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index 748edcdb7..d35d4732a 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -730,9 +730,6 @@ class ThreadItem { $observer = $conv->get_observer(); - $qc = ((local_channel()) ? get_pconfig(local_channel(),'system','qcomment') : null); - $qcomment = (($qc) ? explode("\n",$qc) : null); - $arr = array('comment_buttons' => '','id' => $this->get_id()); call_hooks('comment_buttons',$arr); $comment_buttons = $arr['comment_buttons']; @@ -744,7 +741,6 @@ class ThreadItem { '$type' => (($conv->get_mode() === 'channel') ? 'wall-comment' : 'net-comment'), '$id' => $this->get_id(), '$parent' => $this->get_id(), - '$qcomment' => $qcomment, '$comment_buttons' => $comment_buttons, '$profile_uid' => $conv->get_profile_owner(), '$mylink' => $observer['xchan_url'], |