Ejemplo n.º 1
0
 public function removeGroupAction()
 {
     $showInstanceId = $this->sched_sess->showInstanceId;
     $group_id = $this->_getParam('groupId');
     $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->removeGroupFromShow($group_id);
     }
     $this->view->showContent = $show->getShowContent();
     $this->view->timeFilled = $show->getTimeScheduled();
     $this->view->percentFilled = $show->getPercentScheduled();
     $this->view->chosen = $this->view->render('schedule/scheduled-content.phtml');
     unset($this->view->showContent);
 }