/**
* @service affiliate_panel_settings write
*
* @return Gpf_Rpc_Action
*/
public function setDefaultTheme(Gpf_Rpc_Params $params) {
$action = new Gpf_Rpc_Action($params);
$action->setErrorMessage($this->_("Error changing default theme"));
$action->setInfoMessage($this->_("Default theme changed"));
try {
Gpf_Settings::set($action->getParam("settingName"), $action->getParam('themeId'));
if ($action->existsParam('allAffiliates') && $action->getParam('allAffiliates') == Gpf::YES) {
$this->updateThemeExistingAffiliates($action->getParam('themeId'));
}
$action->addOk();
} catch (Exception $e) {
$action->addError();
}
return $action;
}