コード例 #1
0
 public function preDispatch()
 {
     parent::preDispatch();
     if (in_array('cc', $this->getDi()->modules->getEnabled())) {
         throw new Am_Exception_AccessDenied(___('Online backup is disabled if you have CC payment plugins enabled. Use offline backup instead'));
     }
 }
コード例 #2
0
 public function preDispatch()
 {
     parent::preDispatch();
     if ($this->getDi()->auth->getUserId()) {
         $this->_redirect('member');
     }
 }
コード例 #3
0
 function preDispatch()
 {
     $this->user_id = intval($this->_request->user_id);
     if ($this->_request->getActionName() != 'log') {
         if ($this->user_id <= 0) {
             throw new Am_Exception_InputError("user_id is empty in " . get_class($this));
         }
     }
     return parent::preDispatch();
 }
コード例 #4
0
ファイル: AdminController.php プロジェクト: grlf/eyedock
 public function preDispatch()
 {
     $db_version = $this->getDi()->store->get('db_version');
     if (empty($db_version)) {
         $this->getDi()->store->set('db_version', AM_VERSION);
     } elseif ($db_version != AM_VERSION) {
         $this->redirectLocation(REL_ROOT_URL . '/admin-upgrade-db');
     }
     parent::preDispatch();
 }
コード例 #5
0
ファイル: FaqController.php プロジェクト: grlf/eyedock
 function preDispatch()
 {
     if (!$this->getModule()->getConfig('does_not_require_login')) {
         $this->getDi()->auth->requireLogin(ROOT_URL . '/helpdesk/faq');
     }
     $this->view->headLink()->appendStylesheet($this->view->_scriptCss('helpdesk-user.css'));
     if ($this->getDi()->auth->getUser() && ($page = $this->getDi()->navigationUser->findOneBy('id', 'helpdesk-faq'))) {
         $page->setActive(true);
     }
     parent::preDispatch();
 }
コード例 #6
0
 public function preDispatch()
 {
     parent::preDispatch();
     $this->view->invoice = null;
     $this->view->id = null;
     $this->view->paysystems = array();
     $this->invoice = $this->getDi()->invoiceTable->findBySecureId($this->getFiltered('id'), "CANCEL");
     if ($this->invoice) {
         if ($this->invoice->isPaid()) {
             throw new Am_Exception_InputError("Invoice #{$id} is already paid");
         }
         $this->getDi()->plugins_payment->loadEnabled();
         $this->view->paysystems = $this->getDi()->paysystemList->getAllPublicAsArrays();
         $this->view->invoice = $this->invoice;
         $this->view->id = $this->getFiltered('id');
     }
 }
コード例 #7
0
ファイル: Grid.php プロジェクト: subashemphasize/test_site
 public function preDispatch()
 {
     $this->grid = $this->createGrid();
     parent::preDispatch();
 }
コード例 #8
0
 function preDispatch()
 {
     $this->user_id = intval($this->_request->user_id);
     if (!in_array($this->_request->getActionName(), array('log', 'invoice'))) {
         if ($this->user_id <= 0) {
             throw new Am_Exception_InputError("user_id is empty in " . get_class($this));
         }
     }
     $this->setActiveMenu('users-browse');
     return parent::preDispatch();
 }