Example #1
0
 /**
  * Overwrites the existing saveFrontendMessage.
  * Runs a regular save first and if successful, runs a second save for the alert before a meeting starts.
  *
  * @return boolean True for a sucessful save.
  */
 public function saveFrontendMessage()
 {
     $this->_validFrom = null;
     $this->_validUntil = null;
     $this->_controllProcess = null;
     if (null === $this->_model->rrule || empty($this->_model->rrule)) {
         // Single events
         parent::saveFrontendMessage();
     } else {
         // Multiple events
         // Check if is already saved
         if (Zend_Registry::isRegistered('keepSavedIds')) {
             $keepSavedIds = Zend_Registry::get('keepSavedIds');
             $isSaved = isset($keepSavedIds[$this->_model->participantId]);
         } else {
             $isSaved = false;
             $keepSavedIds = array();
         }
         // Only save the first one
         if ($this->_model->parentId != 0 && !$isSaved) {
             $keepSavedIds[$this->_model->participantId] = true;
             Zend_Registry::set('keepSavedIds', $keepSavedIds);
             parent::saveFrontendMessage();
         }
     }
     $this->_validFrom = $this->getCalendarValidFrom();
     $this->_validUntil = $this->getCalendarValidUntil();
     $this->_controllProcess = Phprojekt_Notification::LAST_ACTION_REMIND;
     return parent::saveFrontendMessage();
 }
 /**
  * Logout action.
  *
  * Logout the user, and redirect them to the login page.
  *
  * @return void
  */
 public function logoutAction()
 {
     $frontendMessage = new Phprojekt_Notification();
     $frontendMessage->setControllProcess(Phprojekt_Notification::LAST_ACTION_LOGOUT);
     $frontendMessage->saveFrontendMessage();
     Phprojekt_Auth::logout();
     $config = Phprojekt::getInstance()->getConfig();
     $this->_redirect('../../index.php');
     die;
 }