From 1ca988b177834467671137c94f17a5948b465f6f Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 15 Feb 2023 09:41:48 +0000 Subject: revisit author_id and fix issue with pinned content --- Zotlabs/Module/Channel.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php index d3d72ca10..748d990cb 100644 --- a/Zotlabs/Module/Channel.php +++ b/Zotlabs/Module/Channel.php @@ -247,9 +247,7 @@ class Channel extends Controller { $channel_acl = ['allow_cid' => '', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '']; } - if ($perms['post_wall']) { - $x = [ 'is_owner' => $is_owner, 'allow_location' => ((($is_owner || $observer) && (intval(get_pconfig(App::$profile['profile_uid'], 'system', 'use_browser_location')))) ? true : false), @@ -273,6 +271,12 @@ class Channel extends Controller { $o .= status_editor($a, $x, false, 'Channel'); } + // Add pinned content + if (!x($_REQUEST, 'mid') && !$search) { + $pinned = new \Zotlabs\Widget\Pinned; + $r = $pinned->widget(intval(App::$profile['profile_uid']), [ITEM_TYPE_POST]); + $o .= $r['html']; + } } @@ -423,17 +427,14 @@ class Channel extends Controller { $items = []; } - // Add pinned content - if (!x($_REQUEST, 'mid') && !$search) { - $pinned = new \Zotlabs\Widget\Pinned; - $r = $pinned->widget(intval(App::$profile['profile_uid']), [ITEM_TYPE_POST]); - $o .= $r['html']; - } + $mode = (($search) ? 'search' : 'channel'); if ((!$update) && (!$load)) { + + //if we got a decoded hash we must encode it again before handing to javascript $mid = gen_link_id($mid); -- cgit v1.2.3