public function jobProceduralAction() { $status = array("success" => true); if ($this->getParam("type") == "files") { Update::installData($this->getParam("revision")); } else { if ($this->getParam("type") == "clearcache") { \Pimcore\Model\Cache::clearAll(); } else { if ($this->getParam("type") == "preupdate") { $status = Update::executeScript($this->getParam("revision"), "preupdate"); } else { if ($this->getParam("type") == "postupdate") { $status = Update::executeScript($this->getParam("revision"), "postupdate"); } else { if ($this->getParam("type") == "cleanup") { Update::cleanup(); } else { if ($this->getParam("type") == "languages") { Update::downloadLanguage(); } } } } } } $this->_helper->json($status); }
public function jobProceduralAction() { $status = array("success" => true); if ($this->getParam("type") == "files") { Update::installData($this->getParam("revision")); } else { if ($this->getParam("type") == "clearcache") { \Pimcore\Model\Cache::clearAll(); } else { if ($this->getParam("type") == "preupdate") { $status = Update::executeScript($this->getParam("revision"), "preupdate"); } else { if ($this->getParam("type") == "postupdate") { $status = Update::executeScript($this->getParam("revision"), "postupdate"); } else { if ($this->getParam("type") == "cleanup") { Update::cleanup(); } } } } } // we use pure PHP here, otherwise this can cause issues with dependencies that changed during the update header("Content-type: application/json"); echo json_encode($status); exit; }
public function clearCacheAction() { $this->checkPermission("clear_cache"); // empty document cache Cache::clearAll(); $db = \Pimcore\Resource::get(); $db->query("truncate table cache_tags"); $db->query("truncate table cache"); // empty cache directory recursiveDelete(PIMCORE_CACHE_DIRECTORY, false); // PIMCORE-1854 - recreate .dummy file => should remain \Pimcore\File::put(PIMCORE_CACHE_DIRECTORY . "/.dummy", ""); $this->_helper->json(array("success" => true)); }
/** * */ public function delete() { // delete all childs $list = new Listing(); $list->setCondition("parentId = ?", $this->getId()); $list->load(); if (is_array($list->getUsers())) { foreach ($list->getUsers() as $user) { $user->delete(); } } // now delete the current user $this->getResource()->delete(); \Pimcore\Model\Cache::clearAll(); }
/** * {@inheritdoc} */ public function flushAll() { try { SystemCache::clearAll(); return true; } catch (\Exception $e) { return false; } }