1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 11:20:25 +02:00

Filter POST values on custom theme config

This commit is contained in:
Moc
2014-08-10 14:12:21 +02:00
parent 669d19c453
commit b14eeea500

View File

@@ -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;