/** * Updates the current object to the database. * Only the value is updated!!! * * @param bool $strPrevId * * @return bool */ public function updateObjectToDb($strPrevId = false) { $objChangelog = new class_module_system_changelog(); $objChangelog->createLogEntry($this, class_module_system_changelog::$STR_ACTION_EDIT); self::$arrInstanceCache = null; if (!class_module_system_setting::checkConfigExisting($this->getStrName())) { class_logger::getInstance()->addLogRow("new constant " . $this->getStrName() . " with value " . $this->getStrValue(), class_logger::$levelInfo); $strQuery = "INSERT INTO " . _dbprefix_ . "system_config\n (system_config_id, system_config_name, system_config_value, system_config_type, system_config_module) VALUES\n (?, ?, ?, ?, ?)"; return $this->objDB->_pQuery($strQuery, array(generateSystemid(), $this->getStrName(), $this->getStrValue(), (int) $this->getIntType(), (int) $this->getIntModule())); } else { class_logger::getInstance()->addLogRow("updated constant " . $this->getStrName() . " to value " . $this->getStrValue(), class_logger::$levelInfo); $strQuery = "UPDATE " . _dbprefix_ . "system_config\n SET system_config_value = ?\n WHERE system_config_name = ?"; return $this->objDB->_pQuery($strQuery, array($this->getStrValue(), $this->getStrName())); } }