Exemplo n.º 1
0
 /**
  *
  */
 public function publishpageAction()
 {
     $data = Zend_Json::decode($this->getRequest()->jsondata);
     $status = 0;
     try {
         $pagsData = new Pagstructure();
         $pagsData->publish($data['dbId']);
         /*
          * GDE : 27/08/2010
          * Add trace of current action
          */
         $rowPage = $pagsData->find($data['dbId']);
         Sydney_Db_Trace::add('trace.event.publish_page' . ' [' . $rowPage[0]->label . ']', 'adminpages', Sydney_Tools::getTableName($pagsData), 'publispage', $data['dbId']);
         // */
         $msg = 'Element published.';
         //.'ID of the element '.$div->id;
         $status = 1;
         $dbid = $data['dbId'];
     } catch (Exception $e) {
         $msg = 'Error while publishing the element in the database!' . $e->getMessage();
         $status = 0;
     }
     $this->view->ResultSet = array('message' => $msg, 'status' => $status, 'dbid' => $dbid, 'modal' => false);
 }