diff options
author | zotlabs <mike@macgirvin.com> | 2017-09-12 22:32:31 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-09-12 22:32:31 -0700 |
commit | 5e99295bf6f85e7a6d50e0c8f0701a9b37f03332 (patch) | |
tree | 73005cc356bc4e1060f28859247e76fe4c706c45 /Zotlabs/Lib/NativeWikiPage.php | |
parent | 4ff89a58625e647ee74087dfab79ac6dd76cbe6c (diff) | |
download | volse-hubzilla-5e99295bf6f85e7a6d50e0c8f0701a9b37f03332.tar.gz volse-hubzilla-5e99295bf6f85e7a6d50e0c8f0701a9b37f03332.tar.bz2 volse-hubzilla-5e99295bf6f85e7a6d50e0c8f0701a9b37f03332.zip |
wiki mimetype selection
Diffstat (limited to 'Zotlabs/Lib/NativeWikiPage.php')
-rw-r--r-- | Zotlabs/Lib/NativeWikiPage.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Zotlabs/Lib/NativeWikiPage.php b/Zotlabs/Lib/NativeWikiPage.php index 78b54ebda..97dad5813 100644 --- a/Zotlabs/Lib/NativeWikiPage.php +++ b/Zotlabs/Lib/NativeWikiPage.php @@ -55,7 +55,12 @@ class NativeWikiPage { } - static public function create_page($channel_id, $observer_hash, $name, $resource_id) { + static public function create_page($channel_id, $observer_hash, $name, $resource_id, $mimetype = 'text/bbcode') { + + logger('mimetype: ' . $mimetype); + + if(! in_array($mimetype,[ 'text/markdown','text/bbcode','text/plain','text/html'])) + $mimetype = 'text/markdown; $w = Zlib\NativeWiki::get_wiki($channel_id, $observer_hash, $resource_id); @@ -68,6 +73,7 @@ class NativeWikiPage { $arr = []; $arr['uid'] = $channel_id; $arr['author_xchan'] = $observer_hash; + $arr['mimetype'] = $mimetype; $arr['resource_type'] = 'nwikipage'; $arr['resource_id'] = $resource_id; $arr['allow_cid'] = $w['wiki']['allow_cid']; |