diff options
author | zotlabs <mike@macgirvin.com> | 2017-09-12 23:15:30 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-09-12 23:15:30 -0700 |
commit | 796228b7ad3cac90b23de2954445021578635105 (patch) | |
tree | 9e6170a02e2f100c47ba06a5b3026b957351801f /Zotlabs/Module | |
parent | 7489a4442ea2041450b3477400c0ecb29b8670d9 (diff) | |
download | volse-hubzilla-796228b7ad3cac90b23de2954445021578635105.tar.gz volse-hubzilla-796228b7ad3cac90b23de2954445021578635105.tar.bz2 volse-hubzilla-796228b7ad3cac90b23de2954445021578635105.zip |
wiki mimetype selection. We can add text/plain as soon as we add code to purify and render it specifically.
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Wiki.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php index 3fb980955..df747a07a 100644 --- a/Zotlabs/Module/Wiki.php +++ b/Zotlabs/Module/Wiki.php @@ -259,7 +259,7 @@ class Wiki extends \Zotlabs\Web\Controller { goaway(z_root() . '/' . argv(0) . '/' . argv(1) ); } - $mimeType = $p['mimeType']; + $mimeType = $p['pageMimeType']; $sampleContent = (($mimeType == 'text/bbcode') ? '[h3]' . t('New page') . '[/h3]' : '### ' . t('New page')); @@ -323,7 +323,7 @@ class Wiki extends \Zotlabs\Web\Controller { '$modalerroralbum' => t('Error getting album'), )); - if($p['mimeType'] != 'text/bbcode') + if($p['pageMimeType'] != 'text/bbcode') head_add_js('/library/ace/ace.js'); // Ace Code Editor return $o; @@ -347,11 +347,12 @@ class Wiki extends \Zotlabs\Web\Controller { if((argc() > 2) && (argv(2) === 'preview')) { $content = $_POST['content']; $resource_id = $_POST['resource_id']; + $w = Zlib\NativeWiki::get_wiki($owner['channel_id'],$observer_hash,$resource_id); $wikiURL = argv(0) . '/' . argv(1) . '/' . $w['urlName']; - $mimeType = $w['mimeType']; + $mimeType = $_POST['mimetype']; if($mimeType == 'text/bbcode') { $html = Zlib\NativeWikiPage::convert_links(zidify_links(smilies(bbcode($content))),$wikiURL); |