/** * 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; }