public function update()
 {
     $strReturn = "";
     //check installed version and to which version we can update
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     $strReturn .= "Version found:\n\t Module: " . $arrModule["module_name"] . ", Version: " . $arrModule["module_version"] . "\n\n";
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.0") {
         $strReturn = "Updating 4.0 to 4.1...\n";
         $strReturn .= "Updating module-versions...\n";
         $this->updateModuleVersion("dashboard", "4.1");
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.1") {
         $strReturn .= "Updating 4.1 to 4.2...\n";
         $strReturn .= "Updating module-versions...\n";
         $this->updateModuleVersion("dashboard", "4.2");
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.2") {
         $strReturn .= "Updating 4.2 to 4.3...\n";
         $strReturn .= "Updating module-versions...\n";
         $this->updateModuleVersion("dashboard", "4.3");
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.3") {
         $strReturn .= "Updating 4.3 to 4.4...\n";
         $strReturn .= "Updating module-versions...\n";
         $this->updateModuleVersion("dashboard", "4.4");
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.4") {
         $strReturn .= "Updating 4.4 to 4.5...\n";
         $strReturn .= "Updating module-versions...\n";
         $this->updateModuleVersion("dashboard", "4.5");
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.5") {
         $strReturn .= "Updating 4.5 to 4.6...\n";
         $strReturn .= "Updating module-versions...\n";
         $this->updateModuleVersion("dashboard", "4.6");
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.6") {
         $strReturn .= "Updating to 4.7...\n";
         $strReturn .= "Updating module-versions...\n";
         $this->updateModuleVersion("dashboard", "4.7");
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.7") {
         $strReturn .= $this->update_47_475();
     }
     return $strReturn . "\n\n";
 }
 public function update()
 {
     $strReturn = "";
     //check installed version and to which version we can update
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     $strReturn .= "Version found:\n\t Module: " . $arrModule["module_name"] . ", Version: " . $arrModule["module_version"] . "\n\n";
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "1.2") {
         $strReturn .= "Updating 1.2 to 1.3...\n";
         $strReturn .= "Updating module-versions...\n";
         $this->updateModuleVersion("votings", "1.3");
         $strReturn .= "Updating element-versions...\n";
         $this->updateElementVersion("votings", "1.3");
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "1.3") {
         $strReturn .= "Updating 1.3 to 1.4...\n";
         $strReturn .= "Updating module-versions...\n";
         $this->updateModuleVersion("votings", "1.4");
         $strReturn .= "Updating element-versions...\n";
         $this->updateElementVersion("votings", "1.4");
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "1.4") {
         $strReturn .= "Updating 1.4 to 1.5...\n";
         $strReturn .= "Updating module-versions...\n";
         $this->updateModuleVersion("votings", "1.5");
         $strReturn .= "Updating element-versions...\n";
         $this->updateElementVersion("votings", "1.5");
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "1.5") {
         $strReturn .= "Updating 1.5 to 1.6...\n";
         $strReturn .= "Updating module-versions...\n";
         $this->updateModuleVersion("votings", "1.6");
         $strReturn .= "Updating element-versions...\n";
         $this->updateElementVersion("votings", "1.6");
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "1.6") {
         $strReturn .= "Updating to 1.7...\n";
         $strReturn .= "Updating module-versions...\n";
         $this->updateModuleVersion("votings", "1.7");
         $strReturn .= "Updating element-versions...\n";
         $this->updateElementVersion("votings", "1.7");
         $this->objDB->flushQueryCache();
     }
     return $strReturn . "\n\n";
 }
 /**
  * Checks if version is enabled in general and for the passed object
  *
  * @param interface_versionable $objSourceModel
  *
  * @return bool
  * @throws class_exception
  */
 private function isVersioningAvailable(interface_versionable $objSourceModel)
 {
     if (self::$bitChangelogEnabled !== null) {
         return self::$bitChangelogEnabled;
     }
     //        if(class_module_system_setting::getConfigValue("_system_changehistory_enabled_") != "true") {
     //            self::$bitChangelogEnabled = false;
     //            return false;
     //        }
     if (!$objSourceModel instanceof interface_versionable) {
         throw new class_exception("object passed to create changelog not implementing interface_versionable", class_logger::$levelWarning);
     }
     //changes require at least kajona 3.4.9
     $arrModul = class_module_system_module::getPlainModuleData("system");
     if (version_compare($arrModul["module_version"], "3.4.9") < 0) {
         self::$bitChangelogEnabled = false;
         return false;
     }
     self::$bitChangelogEnabled = true;
     return true;
 }
예제 #4
0
 public function update()
 {
     $strReturn = "";
     //check installed version and to which version we can update
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     $strReturn .= "Version found:\n\t Module: " . $arrModule["module_name"] . ", Version: " . $arrModule["module_version"] . "\n\n";
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.0") {
         $strReturn .= "Updating 4.0 to 4.1...\n";
         $strReturn .= "Updating module-versions...\n";
         $this->updateModuleVersion("search", "4.1");
         $this->updateElementVersion("search", "4.1");
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.1") {
         $strReturn .= "Updating 4.1 to 4.2...\n";
         $strReturn .= "Updating module-versions...\n";
         $this->updateModuleVersion("search", "4.2");
         $this->updateElementVersion("search", "4.2");
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.2") {
         $strReturn .= "Updating 4.2 to 4.3...\n";
         $strReturn .= "Updating module-versions...\n";
         $this->updateModuleVersion("search", "4.3");
         $this->updateElementVersion("search", "4.3");
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.3") {
         $strReturn .= $this->update_43_44();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.4" || $arrModule["module_version"] == "4.4.1") {
         $strReturn .= $this->update_441_45();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.5") {
         $strReturn .= $this->update_45_451();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.5.1") {
         $strReturn .= $this->update_451_452();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.5.2") {
         $strReturn .= "Updating 4.5.2 to 4.6...\n";
         $strReturn .= "Updating module-versions...\n";
         $this->updateModuleVersion("search", "4.6");
         $this->updateElementVersion("search", "4.6");
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.6") {
         $strReturn .= $this->update_46_461();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.6.1") {
         $strReturn .= "Updating to 4.7...\n";
         $this->updateModuleVersion("search", "4.7");
         $this->updateElementVersion("search", "4.7");
     }
     if ($this->bitIndexRebuild) {
         $strReturn .= "Rebuilding search index...\n";
         $this->updateIndex();
     }
     return $strReturn . "\n\n";
 }
예제 #5
0
 /**
  * Returns the data for a registered module
  *
  * @param string $strName
  * @param bool $bitCache
  * @return mixed
  * @deprecated
  * @see class_module_system_module::getPlainModuleData($strName, $bitCache)
  */
 public function getModuleData($strName, $bitCache = true)
 {
     return class_module_system_module::getPlainModuleData($strName, $bitCache);
 }
예제 #6
0
 public function update()
 {
     $strReturn = "";
     //check installed version and to which version we can update
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     $strReturn .= "Version found:\n\t Module: " . $arrModule["module_name"] . ", Version: " . $arrModule["module_version"] . "\n\n";
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.0") {
         $strReturn .= $this->update_40_401();
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.0.1") {
         $strReturn .= $this->update_401_41();
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.1") {
         $strReturn .= $this->update_41_411();
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.1.1") {
         $strReturn .= $this->update_411_42();
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.2") {
         $strReturn .= "Updating 4.2 to 4.3...\n";
         $strReturn .= "Updating module-versions...\n";
         $this->updateModuleVersion("", "4.3");
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.3") {
         $strReturn .= $this->update_43_431();
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.3.1") {
         $strReturn .= $this->update_431_432();
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.3.2") {
         $strReturn .= $this->update_432_44();
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.4") {
         $strReturn .= "Updating 4.4 to 4.4.1...\n";
         $this->updateModuleVersion("", "4.4.1");
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.4.1") {
         $strReturn .= "Updating 4.4.1 to 4.4.2...\n";
         $this->updateModuleVersion("", "4.4.2");
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.4.2") {
         $strReturn .= "Updating 4.4.2 to 4.4.3...\n";
         $this->updateModuleVersion("", "4.4.3");
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.4.3") {
         $strReturn .= "Updating 4.4.3 to 4.4.4...\n";
         $this->updateModuleVersion("", "4.4.4");
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.4.4") {
         $strReturn .= $this->update_444_45();
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.5") {
         $strReturn .= $this->update_45_451();
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.5.1") {
         $strReturn .= "Updating 4.5.1 to 4.6...\n";
         $this->updateModuleVersion("", "4.6");
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.6") {
         $strReturn .= "Updating 4.6 to 4.6.1...\n";
         $this->updateModuleVersion("", "4.6.1");
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.6.1") {
         $strReturn .= "Updating 4.6.1 to 4.6.2...\n";
         $this->updateModuleVersion("", "4.6.2");
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.6.2") {
         $strReturn .= "Updating 4.6.2 to 4.6.3...\n";
         $this->updateModuleVersion("", "4.6.3");
         $this->objDB->flushQueryCache();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.6.3") {
         $strReturn .= $this->update_463_464();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.6.4") {
         $strReturn .= $this->update_464_465();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.6.5") {
         $strReturn .= $this->update_465_47();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.7") {
         $strReturn .= $this->update_47_475();
     }
     return $strReturn . "\n\n";
 }
예제 #7
0
 public function update()
 {
     $strReturn = "";
     //check installed version and to which version we can update
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     $strReturn .= "Version found:\n\t Module: " . $arrModule["module_name"] . ", Version: " . $arrModule["module_version"] . "\n\n";
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.0") {
         $strReturn .= $this->update_40_401();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.0.1") {
         $strReturn .= $this->update_401_41();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.1") {
         $strReturn .= $this->update_41_42();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.2") {
         $strReturn .= $this->update_42_43();
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.3") {
         $strReturn = "Updating 4.3 to 4.4...\n";
         $this->updateModuleVersion("", "4.4");
         $this->updateElementVersion("row", "4.4");
         $this->updateElementVersion("paragraph", "4.4");
         $this->updateElementVersion("image", "4.4");
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.4") {
         $strReturn = "Updating 4.4 to 4.5...\n";
         $this->updateModuleVersion("", "4.5");
         $this->updateElementVersion("row", "4.5");
         $this->updateElementVersion("paragraph", "4.5");
         $this->updateElementVersion("image", "4.5");
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.5") {
         $strReturn = "Updating 4.5 to 4.6...\n";
         $this->updateModuleVersion("", "4.6");
         $this->updateElementVersion("row", "4.6");
         $this->updateElementVersion("paragraph", "4.6");
         $this->updateElementVersion("image", "4.6");
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.6") {
         $strReturn = "Updating 4.6 to 4.6.1...\n";
         $this->updateModuleVersion("", "4.6.1");
         $this->updateElementVersion("row", "4.6.1");
         $this->updateElementVersion("paragraph", "4.6.1");
         $this->updateElementVersion("image", "4.6.1");
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.6.1") {
         $strReturn = "Updating 4.6.1 to 4.6.2...\n";
         $this->updateModuleVersion("", "4.6.2");
         $this->updateElementVersion("row", "4.6.2");
         $this->updateElementVersion("paragraph", "4.6.2");
         $this->updateElementVersion("image", "4.6.2");
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.6.2") {
         $strReturn = "Updating to 4.7...\n";
         $this->updateModuleVersion("", "4.7");
         $this->updateElementVersion("row", "4.7");
         $this->updateElementVersion("paragraph", "4.7");
         $this->updateElementVersion("image", "4.7");
     }
     $arrModule = class_module_system_module::getPlainModuleData($this->objMetadata->getStrTitle(), false);
     if ($arrModule["module_version"] == "4.7") {
         $strReturn = "Updating to 4.7.1...\n";
         $this->updateModuleVersion("", "4.7.1");
         $this->updateElementVersion("row", "4.7.1");
         $this->updateElementVersion("paragraph", "4.7.1");
         $this->updateElementVersion("image", "4.7.1");
     }
     return $strReturn . "\n\n";
 }