From f9b732482d1776ba0c8cad593157589189f6bedd Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 28 Nov 2016 15:24:49 +0100 Subject: some basic work for implementing mimetypes for wikis --- Zotlabs/Module/Wiki.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php index 37ebe2a38..d43b71f92 100644 --- a/Zotlabs/Module/Wiki.php +++ b/Zotlabs/Module/Wiki.php @@ -34,10 +34,7 @@ class Wiki extends \Zotlabs\Web\Controller { notice( t('Not found') . EOL); return; } - - $tab = 'wiki'; - - + require_once('include/wiki.php'); require_once('include/acl_selectors.php'); require_once('include/conversation.php'); @@ -151,6 +148,7 @@ class Wiki extends \Zotlabs\Web\Controller { '$create' => t('Create New'), '$submit' => t('Submit'), '$wikiName' => array('wikiName', t('Wiki name')), + '$mimeType' => array('mimeType', t('Content type'), '', '', ['text/markdown' => 'Markdown', 'text/bbcode' => 'BB Code']), '$name' => t('Name'), '$lockstate' => $x['lockstate'], '$acl' => $x['acl'], @@ -322,6 +320,7 @@ class Wiki extends \Zotlabs\Web\Controller { $wiki['rawName'] = $_POST['wikiName']; $wiki['htmlName'] = escape_tags($_POST['wikiName']); $wiki['urlName'] = urlencode($_POST['wikiName']); + $wiki['mimeType'] = $_POST['mimeType']; if($wiki['urlName'] === '') { notice( t('Error creating wiki. Invalid name.') . EOL); goaway('/wiki'); -- cgit v1.2.3