- Timestamp:
- Aug 8, 2019 9:58:42 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Lock.inc.php
r690 r694 185 185 * @param string $record_key The key column for the record to lock. 186 186 * @param string $record_val The value of the key column for the record to lock. 187 * @param string $title A title to apply to the lock, for display purposes.188 187 */ 189 188 public function select($record_table_or_lock_id, $record_key=null, $record_val=null) … … 245 244 $this->initDB(); 246 245 247 if ( isset($this->data['lock_id'])) {246 if ($this->isLocked()) { 248 247 $qid = $db->query("SELECT * FROM " . $db->escapeString($this->getParam('db_table')) . " WHERE lock_id = '" . $db->escapeString($this->data['lock_id']) . "'"); 249 248 if ($lock = mysql_fetch_assoc($qid)) { … … 328 327 $this->_auto_timeout(); 329 328 329 if (!$this->isLocked()) { 330 // No lock selected. 331 return false; 332 } 333 330 334 // Delete a specific lock. 331 335 $db->query(" … … 335 339 336 340 $app->logMsg(sprintf('Removing lock: %s', $this->data['lock_id']), LOG_DEBUG, __FILE__, __LINE__); 341 return true; 337 342 } 338 343
Note: See TracChangeset
for help on using the changeset viewer.