mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 13:17:24 +02:00
Filter POST values on custom theme config
This commit is contained in:
@@ -8,10 +8,11 @@ class theme__blank implements e_theme_config
|
|||||||
function process() // Save posted values from config() fields.
|
function process() // Save posted values from config() fields.
|
||||||
{
|
{
|
||||||
$pref = e107::getConfig();
|
$pref = e107::getConfig();
|
||||||
|
$tp = e107::getParser();
|
||||||
|
|
||||||
$theme_pref = array();
|
$theme_pref = array();
|
||||||
$theme_pref['example'] = $_POST['_blank_example'];
|
$theme_pref['example'] = $tp->toDb($_POST['_blank_example']);
|
||||||
$theme_pref['example2'] = intval($_POST['_blank_example2']);
|
$theme_pref['example2'] = $tp->toDb($_POST['_blank_example2']);
|
||||||
|
|
||||||
$pref->set('sitetheme_pref', $theme_pref);
|
$pref->set('sitetheme_pref', $theme_pref);
|
||||||
return $pref->dataHasChanged();
|
return $pref->dataHasChanged();
|
||||||
@@ -24,7 +25,7 @@ class theme__blank implements e_theme_config
|
|||||||
$var[0]['caption'] = "Sample configuration field";
|
$var[0]['caption'] = "Sample configuration field";
|
||||||
$var[0]['html'] = $frm->text('_blank_example', e107::getThemePref('example', 'default'));
|
$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'));
|
$var[1]['html'] = $frm->text('_blank_example2', e107::getThemePref('example2', 'default'));
|
||||||
|
|
||||||
return $var;
|
return $var;
|
||||||
|
Reference in New Issue
Block a user