aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/NativeWiki.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-09-16 16:52:25 -0700
committerzotlabs <mike@macgirvin.com>2017-09-16 16:52:25 -0700
commit9120a82ab4c4051b37794ca4d87ee3ae52084459 (patch)
treef789443a66507fef223f7c85f5472613b7ba6493 /Zotlabs/Lib/NativeWiki.php
parentca24bfdc464a414ad30aec2dec307c174ef60a0f (diff)
downloadvolse-hubzilla-9120a82ab4c4051b37794ca4d87ee3ae52084459.tar.gz
volse-hubzilla-9120a82ab4c4051b37794ca4d87ee3ae52084459.tar.bz2
volse-hubzilla-9120a82ab4c4051b37794ca4d87ee3ae52084459.zip
wiki: update acl on child pages when wiki perms change
Diffstat (limited to 'Zotlabs/Lib/NativeWiki.php')
-rw-r--r--Zotlabs/Lib/NativeWiki.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/Zotlabs/Lib/NativeWiki.php b/Zotlabs/Lib/NativeWiki.php
index 22aa1817a..7642dbb3e 100644
--- a/Zotlabs/Lib/NativeWiki.php
+++ b/Zotlabs/Lib/NativeWiki.php
@@ -135,6 +135,18 @@ class NativeWiki {
$item_id = $update['item_id'];
+ // update acl for any existing wiki pages
+
+ q("update item set allow_cid = '%s', allow_gid = '%s', deny_cid = '%s', deny_gid = '%s', item_private = %d where resource_type = 'nwikipage' and resource_id = '%s'",
+ dbesc($item['allow_cid']),
+ dbesc($item['allow_gid']),
+ dbesc($item['deny_cid']),
+ dbesc($item['deny_gid']),
+ dbesc($item['item_private']),
+ dbesc($arr['resource_id'])
+ );
+
+
if($update['item_id']) {
info( t('Wiki updated successfully'));
if($update_title) {