diff options
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Lib/Enotify.php | 2 | ||||
-rw-r--r-- | Zotlabs/Lib/ThreadItem.php | 13 | ||||
-rw-r--r-- | Zotlabs/Module/Events.php | 4 | ||||
-rw-r--r-- | Zotlabs/Module/Item.php | 4 | ||||
-rw-r--r-- | Zotlabs/Module/Oembed.php | 2 |
5 files changed, 20 insertions, 5 deletions
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php index 92b9fddbd..421d310d9 100644 --- a/Zotlabs/Lib/Enotify.php +++ b/Zotlabs/Lib/Enotify.php @@ -677,7 +677,7 @@ class Enotify { // convert this logic into a json array just like the system notifications return array( - 'notify_link' => $item['llink'], + 'notify_link' => $item['llink'], 'name' => $item['author']['xchan_name'], 'url' => $item['author']['xchan_url'], 'photo' => $item['author']['xchan_photo_s'], diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index 120a34a19..a3e871810 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -174,6 +174,11 @@ class ThreadItem { $responses = get_responses($conv_responses,$response_verbs,$this,$item); + $my_responses = []; + foreach($response_verbs as $v) { + $my_responses[$v] = (($conv_responses[$v][$item['mid'] . '-m']) ? 1 : 0); + } + $like_count = ((x($conv_responses['like'],$item['mid'])) ? $conv_responses['like'][$item['mid']] : ''); $like_list = ((x($conv_responses['like'],$item['mid'])) ? $conv_responses['like'][$item['mid'] . '-l'] : ''); if (count($like_list) > MAX_LIKERS) { @@ -381,6 +386,7 @@ class ThreadItem { 'list_unseen_txt' => $list_unseen_txt, 'markseen' => t('Mark all seen'), 'responses' => $responses, + 'my_responses' => $my_responses, 'like_count' => $like_count, 'like_list' => $like_list, 'like_list_part' => $like_list_part, @@ -397,6 +403,7 @@ class ThreadItem { 'comment' => $this->get_comment_box($indent), 'previewing' => ($conv->is_preview() ? ' preview ' : ''), 'wait' => t('Please wait'), + 'submid' => substr($item['mid'],0,32), 'thread_level' => $thread_level ); @@ -412,6 +419,12 @@ class ThreadItem { if($visible_comments === false) $visible_comments = 3; +// needed for scroll to comment from notification but needs more work +// as we do not want to open all comments unless there is actually an #item_xx anchor +// and the url fragment is not sent to the server. +// if(in_array(\App::$module,['display','update_display'])) +// $visible_comments = 99999; + if(($this->get_display_mode() === 'normal') && ($nb_children > 0)) { foreach($children as $child) { $result['children'][] = $child->get_template_data($conv_responses, $thread_level + 1); diff --git a/Zotlabs/Module/Events.php b/Zotlabs/Module/Events.php index d27de9989..2bff4676e 100644 --- a/Zotlabs/Module/Events.php +++ b/Zotlabs/Module/Events.php @@ -118,7 +118,7 @@ class Events extends \Zotlabs\Web\Controller { goaway($onerror_url); } - $share = ((intval($_POST['share'])) ? intval($_POST['share']) : 0); + $share = ((intval($_POST['distr'])) ? intval($_POST['distr']) : 0); $channel = \App::get_channel(); @@ -469,7 +469,7 @@ class Events extends \Zotlabs\Web\Controller { '$t_orig' => $t_orig, '$sh_text' => t('Share this event'), '$sh_checked' => $sh_checked, - '$share' => array('share', t('Share this event'), $sh_checked, '', array(t('No'),t('Yes'))), + '$share' => array('distr', t('Share this event'), $sh_checked, '', array(t('No'),t('Yes'))), '$preview' => t('Preview'), '$perms_label' => t('Permission settings'), // populating the acl dialog was a permission description from view_stream because Cal.php, which diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index ac2067356..dff1c6404 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -922,7 +922,9 @@ class Item extends \Zotlabs\Web\Controller { $post = item_store($datarray,$execflag); $post_id = $post['item_id']; - + + $datarray = $post['item']; + if($post_id) { logger('mod_item: saved item ' . $post_id); diff --git a/Zotlabs/Module/Oembed.php b/Zotlabs/Module/Oembed.php index 6f61ab4d8..9394e5942 100644 --- a/Zotlabs/Module/Oembed.php +++ b/Zotlabs/Module/Oembed.php @@ -25,7 +25,7 @@ class Oembed extends \Zotlabs\Web\Controller { echo "<html><head><base target=\"_blank\" /></head><body>"; $src = base64url_decode(argv(1)); $j = oembed_fetch_url($src); - echo $j->html; + echo $j['html']; // logger('mod-oembed ' . $h, LOGGER_ALL); echo "</body></html>"; } |