From 5e99295bf6f85e7a6d50e0c8f0701a9b37f03332 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 12 Sep 2017 22:32:31 -0700 Subject: wiki mimetype selection --- include/text.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 51d711021..58e2b8256 100644 --- a/include/text.php +++ b/include/text.php @@ -1786,15 +1786,15 @@ function layout_select($channel_id, $current = '') { } -function mimetype_select($channel_id, $current = 'text/bbcode') { +function mimetype_select($channel_id, $current = 'text/bbcode', $choices = null) { - $x = array( + $x = (($choices) ? $choices : [ 'text/bbcode', 'text/html', 'text/markdown', 'text/plain', 'application/x-pdl' - ); + ]); if((App::$is_sys) || (channel_codeallowed($channel_id) && $channel_id == local_channel())){ -- cgit v1.2.3 From 0e6d84e20731f173e489fe0d54b43c01266c0391 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 12 Sep 2017 23:25:19 -0700 Subject: add option to mimetype selector so you can change the element name in case you end up with two of these suckers on the same page --- include/text.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 58e2b8256..c4d441e85 100644 --- a/include/text.php +++ b/include/text.php @@ -1786,7 +1786,7 @@ function layout_select($channel_id, $current = '') { } -function mimetype_select($channel_id, $current = 'text/bbcode', $choices = null) { +function mimetype_select($channel_id, $current = 'text/bbcode', $choices = null, $element = 'mimetype') { $x = (($choices) ? $choices : [ 'text/bbcode', @@ -1807,7 +1807,7 @@ function mimetype_select($channel_id, $current = 'text/bbcode', $choices = null) } $o = replace_macros(get_markup_template('field_select_raw.tpl'), array( - '$field' => array('mimetype', t('Page content type'), $selected, '', $options) + '$field' => array( $element, t('Page content type'), $selected, '', $options) )); return $o; -- cgit v1.2.3