aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-09-14 17:14:50 -0700
committerzotlabs <mike@macgirvin.com>2017-09-14 17:14:50 -0700
commitcf120b235117017a81b8a9b1a073919fb1b7d50b (patch)
treede1e922bed55ef09b4651eb9aab5c5cc6ca8f0ec /Zotlabs/Lib
parent6481722fd91a9c4c27c728aa161093fc97217a8e (diff)
downloadvolse-hubzilla-cf120b235117017a81b8a9b1a073919fb1b7d50b.tar.gz
volse-hubzilla-cf120b235117017a81b8a9b1a073919fb1b7d50b.tar.bz2
volse-hubzilla-cf120b235117017a81b8a9b1a073919fb1b7d50b.zip
wiki: lock mimetype
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/NativeWiki.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/Zotlabs/Lib/NativeWiki.php b/Zotlabs/Lib/NativeWiki.php
index 4301feaa0..0c1894625 100644
--- a/Zotlabs/Lib/NativeWiki.php
+++ b/Zotlabs/Lib/NativeWiki.php
@@ -22,6 +22,7 @@ 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);
}
}
@@ -84,7 +85,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'];
@@ -150,13 +153,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
);
}
}