public function handleForm()
{
/* Toggle Advanced/Basic mode. */
if (!empty($this->vars->show_advanced) || !empty($this->vars->show_basic)) {
$GLOBALS['session']->set('horde', 'prefs_advanced', !empty($this->vars->show_advanced));
} elseif (!$this->vars->actionID || !$this->group || !$this->groupIsEditable($this->group)) {
return;
} elseif (isset($this->vars->prefs_return)) {
$this->group = $this->vars->actionID = '';
return;
} else {
try {
$GLOBALS['injector']->getInstance('Horde_Token')->validate($this->vars->horde_prefs_token, 'horde.prefs');
} catch (Horde_Token_Exception $e) {
$GLOBALS['notification']->push($e);
return;
}
}
switch ($this->vars->actionID) {
case 'update_prefs':
if (isset($this->prefGroups[$this->group]['type']) && $this->prefGroups[$this->group]['type'] == 'identities') {
$this->_identitiesUpdate();
} else {
$this->_handleForm($this->getChangeablePrefs($this->group), $GLOBALS['prefs']);
}
break;
case 'update_special':
$special = array();
foreach ($this->getChangeablePrefs($this->group) as $pref) {
if ($this->prefs[$pref]['type'] == 'special') {
$special[] = $pref;
}
}
$this->_handleForm($special, $GLOBALS['prefs']);
break;
}
$this->nobuttons = false;
$this->suppress = array();
}