/** * Unlocks a dataRecord as long as the record is locked by the current one * * @param bool $bitForceUnlock unlocks the record, even if the user is not the owner of the lock. * * @return bool */ public function unlockRecord($bitForceUnlock = false) { if ($bitForceUnlock || $this->isLockedByCurrentUser()) { $strQuery = "UPDATE " . _dbprefix_ . "system\n SET system_lock_id = '0'\n WHERE system_id=? "; if (class_carrier::getInstance()->getObjDB()->_pQuery($strQuery, array($this->strSystemid))) { if ($this->objSourceObject !== null) { $this->objSourceObject->setStrLockId(""); } class_carrier::getInstance()->flushCache(class_carrier::INT_CACHE_TYPE_DBQUERIES | class_carrier::INT_CACHE_TYPE_ORMCACHE); return true; } } return false; }
/** * Constructor * * @param string $strSystemid */ public function __construct($strSystemid) { parent::__construct($strSystemid); //Increase max execution time if (@ini_get("max_execution_time") < 7200 && @ini_get("max_execution_time") > 0) { @ini_set("max_execution_time", "7200"); } }
/** * Constructor * */ public function __construct() { //try to fetch the current dir $strDir = class_resourceloader::getInstance()->getPathForFile("/installer/" . get_class($this) . ".php"); $strDir = dirname(_realpath_ . $strDir); $this->objMetadata = new class_module_packagemanager_metadata(); $this->objMetadata->autoInit(uniStrReplace(array("/installer", _realpath_), array("", ""), $strDir)); parent::__construct(); }
/** * Builds the change-array based on the old- and new values * * @param interface_versionable|class_root $objSourceModel * @param bool $bitUseInitValues * * @return array */ private function createChangeArray($objSourceModel, $bitUseInitValues = false) { $arrOldValues = $this->getOldValuesForSystemid($objSourceModel->getSystemid()); if ($bitUseInitValues) { $arrOldValues = $this->getInitValuesForSystemid($objSourceModel->getSystemid()); } //this are now the new ones $arrNewValues = $this->readVersionableProperties($objSourceModel); if ($arrOldValues == null) { $arrOldValues = array(); } if ($arrNewValues == null) { $arrNewValues = array(); } $arrReturn = array(); foreach ($arrNewValues as $strPropertyName => $objValue) { $arrReturn[] = array("property" => $strPropertyName, "oldvalue" => isset($arrOldValues[$strPropertyName]) ? $arrOldValues[$strPropertyName] : "", "newvalue" => isset($arrNewValues[$strPropertyName]) ? $arrNewValues[$strPropertyName] : ""); } return $arrReturn; }