Fix standards

This commit is contained in:
Hypolite Petovan 2018-03-09 07:58:46 -05:00
parent 71c1be8207
commit 99b4ec147c
1 changed files with 5 additions and 6 deletions

View File

@ -15,7 +15,7 @@ function babel_content()
{ {
$results = []; $results = [];
if (!empty($_REQUEST['text'])) { if (!empty($_REQUEST['text'])) {
switch(defaults($_REQUEST, 'type', 'bbcode')) { switch (defaults($_REQUEST, 'type', 'bbcode')) {
case 'bbcode': case 'bbcode':
$bbcode = trim($_REQUEST['text']); $bbcode = trim($_REQUEST['text']);
$results[] = [ $results[] = [
@ -105,12 +105,11 @@ function babel_content()
$tpl = get_markup_template('babel.tpl'); $tpl = get_markup_template('babel.tpl');
$o = replace_macros($tpl, [ $o = replace_macros($tpl, [
'$text' => ['text', L10n::t('Source text'), defaults($_REQUEST, 'text', ''), ''], '$text' => ['text', L10n::t('Source text'), defaults($_REQUEST, 'text', ''), ''],
'$type_bbcode' => ['type', L10n::t('BBCode') , 'bbcode' , '', defaults($_REQUEST, 'type', 'bbcode') == 'bbcode'], '$type_bbcode' => ['type', L10n::t('BBCode'), 'bbcode', '', defaults($_REQUEST, 'type', 'bbcode') == 'bbcode'],
'$type_markdown' => ['type', L10n::t('Markdown'), 'markdown', '', defaults($_REQUEST, 'type', 'bbcode') == 'markdown'], '$type_markdown' => ['type', L10n::t('Markdown'), 'markdown', '', defaults($_REQUEST, 'type', 'bbcode') == 'markdown'],
'$type_html' => ['type', L10n::t('HTML') , 'html' , '', defaults($_REQUEST, 'type', 'bbcode') == 'html'], '$type_html' => ['type', L10n::t('HTML'), 'html', '', defaults($_REQUEST, 'type', 'bbcode') == 'html'],
'$results' => $results
'$results' => $results
]); ]);
return $o; return $o;