Ejemplo n.º 1
0
 public function clearShowAction()
 {
     $showInstanceId = $this->_getParam('id');
     $userInfo = Zend_Auth::getInstance()->getStorage()->read();
     $user = new Application_Model_User($userInfo->id);
     try {
         $show = new Application_Model_ShowInstance($showInstanceId);
     } catch (Exception $e) {
         $this->view->show_error = true;
         return false;
     }
     if ($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER)) || $user->isHostOfShow($show->getShowId())) {
         $show->clearShow();
     }
 }