/** * * @param $id * @return unknown_type */ public function unpublish($id) { $safeInstanceId = Zend_Registry::getInstance()->get('config')->get('db')->safinstances_id; $sql = "UPDATE pagstructure SET status = 'draft',datemodified=NOW(),who_modified = '" . Sydney_Tools::who() . "' WHERE id = " . $id; $this->_db->query($sql); // clean cache of the structure PagstructureOp::cleanCache($safeInstanceId); // clean cache of pages $cache = new Sydney_Cache_Manager(); $cache->clearPageCache($safeInstanceId); }
/** * Empty the structure cache and the page cache * @return void */ public function emptycacheAction() { $data = Zend_Json::decode($this->getRequest()->jsondata); $msg = 'error! Could not clean cache!'; $status = 0; if (isset($data['mode'])) { $cc = new Sydney_Cache_Manager(); if ($data['mode'] == 'page') { if ($cc->clearPageCache($this->safinstancesId)) { $msg = 'Success ! Cache empty ! '; $status = 1; } } if ($data['mode'] == 'all') { if ($cc->clearAllCache($this->safinstancesId)) { $msg = 'Success ! Cache empty ! '; $status = 1; } } } $this->view->ResultSet = array('message' => $msg, 'status' => $status, 'modal' => false); }