From 2d83ea86dca57e6fde65ee93366974ed53d0784f Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 8 Sep 2016 22:33:39 -0700 Subject: more get rid of illegal offset in include/conversation --- Zotlabs/Module/Channel.php | 7 ++++--- Zotlabs/Module/Network.php | 2 +- Zotlabs/Module/Webpages.php | 8 +++++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php index be65354a9..795f0869a 100644 --- a/Zotlabs/Module/Channel.php +++ b/Zotlabs/Module/Channel.php @@ -120,8 +120,9 @@ class Channel extends \Zotlabs\Web\Controller { 'deny_gid' => $channel['channel_deny_gid'] ); } - else - $channel_acl = array(); + else { + $channel_acl = [ 'allow_cid' => '', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '' ]; + } if($perms['post_wall']) { @@ -133,7 +134,7 @@ class Channel extends \Zotlabs\Web\Controller { 'nickname' => \App::$profile['channel_address'], 'lockstate' => (((strlen(\App::$profile['channel_allow_cid'])) || (strlen(\App::$profile['channel_allow_gid'])) || (strlen(\App::$profile['channel_deny_cid'])) || (strlen(\App::$profile['channel_deny_gid']))) ? 'lock' : 'unlock'), 'acl' => (($is_owner) ? populate_acl($channel_acl,true, \Zotlabs\Lib\PermissionDescription::fromGlobalPermission('view_stream'), get_post_aclDialogDescription(), 'acl_dialog_post') : ''), - 'permissions' => (($is_owner) ? $channel_acl : ''), + 'permissions' => $channel_acl, 'showacl' => (($is_owner) ? 'yes' : ''), 'bang' => '', 'visitor' => (($is_owner || $observer) ? true : false), diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php index 70ba263bc..4f831c050 100644 --- a/Zotlabs/Module/Network.php +++ b/Zotlabs/Module/Network.php @@ -139,7 +139,7 @@ class Network extends \Zotlabs\Web\Controller { if($_GET['pf'] === '1') $deftag = '@' . t('forum') . '+' . intval($cid) . '+'; else - $def_acl = array('allow_cid' => '<' . $r[0]['abook_xchan'] . '>'); + $def_acl = [ 'allow_cid' => '<' . $r[0]['abook_xchan'] . '>', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '' ]; } if(! $update) { diff --git a/Zotlabs/Module/Webpages.php b/Zotlabs/Module/Webpages.php index acaca16c3..0da699c73 100644 --- a/Zotlabs/Module/Webpages.php +++ b/Zotlabs/Module/Webpages.php @@ -136,9 +136,11 @@ class Webpages extends \Zotlabs\Web\Controller { 'deny_gid' => $channel['channel_deny_gid'] ); } - else - $channel_acl = array(); + else { + $channel_acl = [ 'allow_cid' => '', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '' ]; + } + $is_owner = ($uid && $uid == $owner); $o = profile_tabs($a, $is_owner, \App::$profile['channel_address']); @@ -148,7 +150,7 @@ class Webpages extends \Zotlabs\Web\Controller { 'nickname' => \App::$profile['channel_address'], 'lockstate' => (($channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'), 'acl' => (($is_owner) ? populate_acl($channel_acl,false, \Zotlabs\Lib\PermissionDescription::fromGlobalPermission('view_pages')) : ''), - 'permissions' => (($is_owner) ? $channel_acl : ''), + 'permissions' => $channel_acl, 'showacl' => (($is_owner) ? true : false), 'visitor' => true, 'hide_location' => true, -- cgit v1.2.3