1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

Preference handler fixes and BC, save_prefs() is using pref handler now and is deprecated, theme handler changes to reflect new preference management.

This commit is contained in:
secretr
2009-08-17 14:40:23 +00:00
parent e3dd3ba6c3
commit aa7f2548a1
5 changed files with 207 additions and 83 deletions

View File

@@ -4,20 +4,19 @@
class theme__blank
{
var $themePref;
function process()
{
$theme_pref = array();
$pref = e107::getConfig();
$theme_pref = array();
$theme_pref['example'] = $_POST['_blank_example'];
$theme_pref['example2'] = $_POST['_blank_example2'];
// print_a($theme_pref);
$pref->add('sitetheme_pref', $theme_pref);
print_a($pref->get('sitetheme_pref'));
var_dump($pref->add('sitetheme_pref', $theme_pref)->save(FALSE));
// save_prefs($pref['sitetheme_pref']);
$pref->set('sitetheme_pref', $theme_pref);
return $pref->dataHasChanged();
}
function config()
@@ -27,7 +26,7 @@ class theme__blank
$var[1]['caption'] = "Another Example";
$var[1]['html'] = "<input type='text' name='_blank_example2' value='".e107::getThemePref('example2')."' />";
var_dump(e107::getThemePref());
//var_dump(e107::getThemePref());
return $var;
}