diff options
author | zotlabs <mike@macgirvin.com> | 2017-09-19 23:30:52 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-09-19 23:30:52 -0700 |
commit | 61d9b34929adc831eb780fd3410660eb98c114a9 (patch) | |
tree | 2f7d6a76a156a2eceb9249d2d05785b13075b070 /include | |
parent | 00fe4e747f9884ab11fe94621f645fc351285964 (diff) | |
download | volse-hubzilla-61d9b34929adc831eb780fd3410660eb98c114a9.tar.gz volse-hubzilla-61d9b34929adc831eb780fd3410660eb98c114a9.tar.bz2 volse-hubzilla-61d9b34929adc831eb780fd3410660eb98c114a9.zip |
use mimetype text description rather than technical name in dropdown choices, found bug in mimetype selection option code
Diffstat (limited to 'include')
-rw-r--r-- | include/text.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/text.php b/include/text.php index c4d441e85..49cc2d6c5 100644 --- a/include/text.php +++ b/include/text.php @@ -1789,21 +1789,21 @@ function layout_select($channel_id, $current = '') { function mimetype_select($channel_id, $current = 'text/bbcode', $choices = null, $element = 'mimetype') { $x = (($choices) ? $choices : [ - 'text/bbcode', - 'text/html', - 'text/markdown', - 'text/plain', - 'application/x-pdl' + 'text/bbcode' => t('BBcode'), + 'text/html' => t('HTML'), + 'text/markdown' => t('Markdown'), + 'text/plain' => t('Text'), + 'application/x-pdl' => t('Comanche Layout') ]); if((App::$is_sys) || (channel_codeallowed($channel_id) && $channel_id == local_channel())){ - $x[] = 'application/x-php'; + $x['application/x-php'] = t('PHP'); } - foreach($x as $y) { + foreach($x as $y => $z) { $selected = (($y == $current) ? ' selected="selected" ' : ''); - $options .= '<option name="' . $y . '"' . $selected . '>' . $y . '</option>'; + $options .= '<option value="' . $y . '"' . $selected . '>' . $z . '</option>'; } $o = replace_macros(get_markup_template('field_select_raw.tpl'), array( |