diff options
author | zotlabs <mike@macgirvin.com> | 2017-02-20 14:07:22 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-02-20 14:07:22 -0800 |
commit | 21e348181063ebddf0a884942fd942fad8dbdf0e (patch) | |
tree | 1ab9dbed370530a4a981a147bec568f38e49b432 /Zotlabs/Lib | |
parent | 6f811fd7f9032efdbe473afd422bb24a691c4e79 (diff) | |
download | volse-hubzilla-21e348181063ebddf0a884942fd942fad8dbdf0e.tar.gz volse-hubzilla-21e348181063ebddf0a884942fd942fad8dbdf0e.tar.bz2 volse-hubzilla-21e348181063ebddf0a884942fd942fad8dbdf0e.zip |
wiki page permissions issue
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r-- | Zotlabs/Lib/NativeWikiPage.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Zotlabs/Lib/NativeWikiPage.php b/Zotlabs/Lib/NativeWikiPage.php index 1467a1cfb..cdb2a5134 100644 --- a/Zotlabs/Lib/NativeWikiPage.php +++ b/Zotlabs/Lib/NativeWikiPage.php @@ -48,13 +48,21 @@ class NativeWikiPage { $w = Zlib\NativeWiki::get_wiki($channel_id, $observer_hash, $resource_id); + if (! $w['wiki']) { + return array('content' => null, 'message' => 'Error reading wiki', 'success' => false); + } + // create an empty activity $arr = []; - $arr['uid'] = $channel_id; - $arr['author_xchan'] = $observer_hash; + $arr['uid'] = $channel_id; + $arr['author_xchan'] = $observer_hash; $arr['resource_type'] = 'nwikipage'; - $arr['resource_id'] = $resource_id; + $arr['resource_id'] = $resource_id; + $arr['allow_cid'] = $w['wiki']['allow_cid']; + $arr['allow_gid'] = $w['wiki']['allow_gid']; + $arr['deny_cid'] = $w['wiki']['deny_cid']; + $arr['deny_gid'] = $w['wiki']['deny_gid']; // We may wish to change this some day. $arr['item_unpublished'] = 1; |