/** * */ public function unpublishpageAction() { $data = Zend_Json::decode($this->getRequest()->jsondata); $status = 0; try { $pagsData = new Pagstructure(); $pagsData->unpublish($data['dbId']); /* * GDE : 27/08/2010 * Add trace of current action */ $rowPage = $pagsData->find($data['dbId']); Sydney_Db_Trace::add('trace.event.unpublish_page' . ' [' . $rowPage[0]->label . ']', 'adminpages', Sydney_Tools::getTableName($pagsData), 'unpublishpage', $data['dbId']); // */ $msg = 'Element UNpublished.'; //.'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; $dbId = ''; } $this->view->ResultSet = array('message' => $msg, 'status' => $status, 'dbid' => $dbId, 'modal' => false); }