From b14eeea5002ed4734ab55403262ef5be325fc2f4 Mon Sep 17 00:00:00 2001 From: Moc Date: Sun, 10 Aug 2014 14:12:21 +0200 Subject: [PATCH] Filter POST values on custom theme config --- e107_themes/_blank/_blank_config.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/e107_themes/_blank/_blank_config.php b/e107_themes/_blank/_blank_config.php index 23a0d76de..7b80bbe36 100644 --- a/e107_themes/_blank/_blank_config.php +++ b/e107_themes/_blank/_blank_config.php @@ -8,10 +8,11 @@ class theme__blank implements e_theme_config function process() // Save posted values from config() fields. { $pref = e107::getConfig(); + $tp = e107::getParser(); $theme_pref = array(); - $theme_pref['example'] = $_POST['_blank_example']; - $theme_pref['example2'] = intval($_POST['_blank_example2']); + $theme_pref['example'] = $tp->toDb($_POST['_blank_example']); + $theme_pref['example2'] = $tp->toDb($_POST['_blank_example2']); $pref->set('sitetheme_pref', $theme_pref); return $pref->dataHasChanged(); @@ -24,7 +25,7 @@ class theme__blank implements e_theme_config $var[0]['caption'] = "Sample configuration field"; $var[0]['html'] = $frm->text('_blank_example', e107::getThemePref('example', 'default')); - $var[1]['caption'] = "Sample configuration field2"; + $var[1]['caption'] = "Sample configuration field 2"; $var[1]['html'] = $frm->text('_blank_example2', e107::getThemePref('example2', 'default')); return $var;