Ejemplo n.º 1
0
 public function loadAction()
 {
     $id = Zend_Filter::filterStatic($this->getRequest()->getParam('initiative'), 'StripTags');
     if (is_numeric($id)) {
         $init = new InitiativeModel($id);
         $json = $init->getJSON();
         if (empty($json)) {
             $this->view->error = 'Could not find requested Initiative';
             $this->render('error');
         }
         $this->view->json = $json;
     } else {
         Globals::getLog()->err('INVALID INITIATIVE ID - ClientInitController id: ' . $id);
         $this->view->error = 'Initiative ID must be numeric';
         $this->render('error');
     }
 }
Ejemplo n.º 2
0
 public function setinitloctreeAction()
 {
     $id = Zend_Filter::filterStatic($this->getRequest()->getParam('id'), 'StripTags');
     $rootId = Zend_Filter::filterStatic($this->getRequest()->getParam('root'), 'StripTags');
     if (is_numeric($id) && is_numeric($rootId)) {
         try {
             $initModel = new InitiativeModel($id);
             $initModel->setRoot($rootId);
         } catch (Exception $e) {
             $this->view->error = $e->getMessage();
             Globals::getLog()->err('ADMIN set initiative location tree error: ' . $this->view->error);
             $this->render('error-xhr');
         }
     }
 }