diff options
author | git-marijus <mario@mariovavti.com> | 2017-09-15 16:30:14 +0200 |
---|---|---|
committer | git-marijus <mario@mariovavti.com> | 2017-09-15 16:30:14 +0200 |
commit | 663802e6992858c026a4e9b325575bc064cc687d (patch) | |
tree | 1889ae84e99fa9c7c39a504a25aca3d492a7ecc7 /Zotlabs/Lib/NativeWiki.php | |
parent | 4c5722c766643af368f600abb93a44fc72d27c11 (diff) | |
parent | 67348547765876faa847fa53f92d37a6b4bc4aa5 (diff) | |
download | volse-hubzilla-663802e6992858c026a4e9b325575bc064cc687d.tar.gz volse-hubzilla-663802e6992858c026a4e9b325575bc064cc687d.tar.bz2 volse-hubzilla-663802e6992858c026a4e9b325575bc064cc687d.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev
Diffstat (limited to 'Zotlabs/Lib/NativeWiki.php')
-rw-r--r-- | Zotlabs/Lib/NativeWiki.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Zotlabs/Lib/NativeWiki.php b/Zotlabs/Lib/NativeWiki.php index 375fad4d7..39952ed5f 100644 --- a/Zotlabs/Lib/NativeWiki.php +++ b/Zotlabs/Lib/NativeWiki.php @@ -28,8 +28,8 @@ class NativeWiki { $w['htmlName'] = escape_tags($w['rawName']); $w['urlName'] = urlencode(urlencode($w['rawName'])); $w['mimeType'] = get_iconfig($w, 'wiki', 'mimeType'); - - + $w['typelock'] = get_iconfig($w, 'wiki', 'typelock'); + $w['lock'] = (($w['item_private'] || $w['allow_cid'] || $w['allow_gid'] || $w['deny_cid'] || $w['deny_gid']) ? true : false); } } // TODO: query db for wikis the observer can access. Return with two lists, for read and write access @@ -91,7 +91,9 @@ class NativeWiki { if(! set_iconfig($arr, 'wiki', 'mimeType', $wiki['mimeType'], true)) { return array('item' => null, 'success' => false); } - + + set_iconfig($arr,'wiki','typelock',$wiki['typelock'],true); + $post = item_store($arr); $item_id = $post['item_id']; @@ -157,13 +159,15 @@ class NativeWiki { // Get wiki metadata $rawName = get_iconfig($w, 'wiki', 'rawName'); $mimeType = get_iconfig($w, 'wiki', 'mimeType'); + $typelock = get_iconfig($w, 'wiki', 'typelock'); return array( - 'wiki' => $w, - 'rawName' => $rawName, + 'wiki' => $w, + 'rawName' => $rawName, 'htmlName' => escape_tags($rawName), - 'urlName' => urlencode(urlencode($rawName)), - 'mimeType' => $mimeType + 'urlName' => urlencode(urlencode($rawName)), + 'mimeType' => $mimeType, + 'typelock' => $typelock ); } } |