private function getCompetition()
 {
     $name = $this->sGet('name');
     $competition = Competition::getCompetitionByName($name);
     if ($competition === null || strtolower($name) != strtolower($competition->getUrlName())) {
         throw new CHttpException(404, 'Error');
     }
     // if (!$competition->isPublic() && !Yii::app()->user->checkRole(User::ROLE_ORGANIZER)) {
     // 	throw new CHttpException(404, 'Error');
     // }
     $competition->formatEvents();
     $this->setCompetitionNavibar($competition);
     $this->setCompetitionBreadcrumbs($competition);
     $name = $competition->getAttributeValue('name');
     if ($this->action->id === 'detail') {
         $this->title = $name;
     } else {
         $this->title = $name . '-' . Yii::t('common', ucfirst($this->action->id));
     }
     $this->pageTitle = array($name, ucfirst($this->action->id));
     $this->appendKeywords($name);
     $this->setDescription($competition->getDescription());
     return $competition;
 }