Changeset 592 for trunk/lib/Lock.inc.php
- Timestamp:
- Apr 3, 2017 8:24:25 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Lock.inc.php
r560 r592 371 371 $db->query(" 372 372 DELETE FROM " . $db->escapeString($this->getParam('db_table')) . " 373 WHERE DATE_ADD(lock_datetime, INTERVAL '" . $ this->getParam('auto_timeout') . "' SECOND) < NOW()373 WHERE DATE_ADD(lock_datetime, INTERVAL '" . $db->escapeString($this->getParam('auto_timeout')) . "' SECOND) < NOW() 374 374 "); 375 375 $_timeout_run = true; … … 388 388 389 389 /** 390 * Print error page. 390 * Print error page. This method is probably not used anywhere; instead, we're including this via the template codebase/services/templates/lock.ihtml 391 391 */ 392 392 public function printErrorHTML() … … 399 399 <div id="sc-msg" class="sc-msg"> 400 400 <div class="sc-msg-notice"> 401 <?php printf(_(" The record %s is currently being edited by %s (%d minutes elapsed). You cannot modify the record while it is locked by another user."),402 $this->getTitle(),401 <?php printf(_("<em>%s</em> is currently being edited by %s (%d minutes elapsed). You cannot modify this database record while it is locked. Please try again later."), 402 ucfirst($this->getTitle()), 403 403 $this->getEditor(), 404 404 date('i', $this->getSecondsElapsed() + 60) … … 450 450 public function getSecondsElapsed() 451 451 { 452 if (isset($this->data['lock_datetime']) && strtotime($this->data['lock_datetime'])< time()) {453 return time() - strtotime($this->data['lock_datetime']);452 if (isset($this->data['lock_datetime']) && false !== ($lock_timestamp = strtotime($this->data['lock_datetime'])) && $lock_timestamp < time()) { 453 return time() - $lock_timestamp; 454 454 } else { 455 455 return 0;
Note: See TracChangeset
for help on using the changeset viewer.