public function preExecute()
 {
     $this->isUserAdmin = $this->checkCredentials();
     $this->tabs = sfPlop::get('sf_plop_dashboard_settings_tabs');
     $this->sub = $this->getRequest()->getParameter('sub');
     ProjectConfiguration::getActive()->LoadHelpers(array('I18N'));
     $this->getResponse()->setTitle(sfPlop::setMetaTitle(__('Dashboard', '', 'plopAdmin')));
 }
 public function preExecute()
 {
     // $module = 'sf_plop_guard_user_address';
     // if (!in_array($module, array_keys(sfPlop::getSafePluginModules()))
     //   && !$this->getUser()->hasCredential($module)
     // )
     //   $this->forward404();
     if (!$this->getUser()->isAuthenticated()) {
         $this->forward(sfConfig::get('sf_login_module'), sfConfig::get('sf_login_action'));
     }
     // if (!$this->getUser()->hasCredential($module))
     //   $this->forward(sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
     parent::preExecute();
     ProjectConfiguration::getActive()->LoadHelpers(array('I18N'));
     $this->getResponse()->setTitle(sfPlop::setMetaTitle(__('User addresses', '', 'plopAdmin')));
 }
 public function preExecute()
 {
     $module = 'sf_extranet_event';
     if (!in_array($module, array_keys(sfPlop::getSafePluginModules()))) {
         $this->forward404();
     }
     if (!$this->getUser()->isAuthenticated()) {
         $this->forward(sfConfig::get('sf_login_module'), sfConfig::get('sf_login_action'));
     }
     if (!$this->getUser()->hasCredential($module)) {
         $this->forward(sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
     }
     parent::preExecute();
     $user = $this->getUser();
     $user->setCulture($user->getProfile()->getCulture());
     ProjectConfiguration::getActive()->LoadHelpers(array('I18N'));
     $this->getResponse()->setTitle(sfPlop::setMetaTitle(__('Extranet events', '', 'plopAdmin')));
 }
 public function preExecute()
 {
     $this->isUserAdmin = $this->checkCredentials();
     ProjectConfiguration::getActive()->LoadHelpers(array('I18N'));
     $this->getResponse()->setTitle(sfPlop::setMetaTitle(__('Extranet dashboard', '', 'plopAdmin')));
 }
 public function executeEditTheme(sfWebRequest $request)
 {
     $this->form = new sfPlopThemeEditionForm();
     if ($request->getMethod() == sfRequest::POST) {
         $this->return = false;
         $this->form->bind($request->getParameter('sfPlopThemeEdition'));
         if ($this->form->isValid()) {
             $this->form->save();
             $this->return = true;
             if ($request->isXmlHttpRequest()) {
                 return $this->return ? sfView::SUCCESS : sfView::ERROR;
             } else {
                 return $this->redirect($request->getReferer());
             }
         }
     } else {
         $this->partial = 'edit_theme';
         $this->params = array('form' => $this->form);
         ProjectConfiguration::getActive()->LoadHelpers(array('I18N'));
         $this->getResponse()->setTitle(sfPlop::setMetaTitle(__('Edit theme', '', 'plopAdmin')));
         $this->decorate(sfPlopCMSActions::T_DEFAULT);
     }
 }