/** * Copies the extracted(!) package from the temp-folder * to the target-folder. * In most cases, this is either located at /core or at /templates. * The original should be deleted afterwards. * * @throws class_exception * @return void */ public function move2Filesystem() { $strSource = $this->objMetadata->getStrPath(); if (!is_dir(_realpath_ . $strSource)) { throw new class_exception("current package " . $strSource . " is not a folder.", class_exception::$level_ERROR); } $objFilesystem = new class_filesystem(); $objFilesystem->chmod($this->getStrTargetPath(), 0777); class_logger::getInstance(class_logger::PACKAGEMANAGEMENT)->addLogRow("moving " . $strSource . " to " . $this->getStrTargetPath(), class_logger::$levelInfo); $objFilesystem->folderCopyRecursive($strSource, $this->getStrTargetPath(), true); $this->objMetadata->setStrPath($this->getStrTargetPath()); $objFilesystem->chmod($this->getStrTargetPath()); $objFilesystem->folderDeleteRecursive($strSource); //shift the cache buster $objSetting = class_module_system_setting::getConfigByName("_system_browser_cachebuster_"); if ($objSetting != null) { $objSetting->setStrValue((int) $objSetting->getStrValue() + 1); $objSetting->updateObjectToDb(); } }