示例#1
0
文件: index.php 项目: difra-org/difra
 public function indexAction()
 {
     if ($this->hasUnusedParameters()) {
         throw new \Difra\View\HttpError(404);
     }
     \Difra\View::redirect('/adm/status');
 }
示例#2
0
文件: index.php 项目: difra-org/difra
 private function _showEvent($link)
 {
     $Announcements = \Difra\Plugins\Announcements::getInstance();
     $Announce = $Announcements->getByLink($link);
     if ($Announce === false) {
         throw new \Difra\View\HttpError(404);
         return;
     }
     if ($link != $Announce->getShortLink()) {
         \Difra\View::redirect($Announce->getShortLink());
     }
     $Announce->getXML($this->eventRoot);
     $additionalsFieldsNode = $this->eventRoot->appendChild($this->eventRoot->ownerDocument->createElement('additionalsFields'));
     \Difra\Plugins\Announcements\Additionals::getListXML($additionalsFieldsNode);
 }
示例#3
0
 /**
  * Password recovery link (stub)
  * @param AnyString $code
  */
 public function codeActionAuth(AnyString $code)
 {
     Cookies::getInstance()->notify(Locales::get('auth/recover/already_logged'), true);
     View::redirect('/');
 }
示例#4
0
 /**
  * Log out
  */
 public function indexAction()
 {
     User::logout();
     \Difra\View::redirect('/');
 }
示例#5
0
 /**
  * Redefine this method if you want custom actions after activation
  */
 protected function afterActivate()
 {
     Cookies::getInstance()->notify(Locales::get('auth/activate/done'));
     \Difra\View::redirect('/');
 }