Commit 8d5645ed authored by Carsten  Rose's avatar Carsten Rose
Browse files

#4311 / Record Lock: expired lock wird nicht geloescht bei form reload

Neu jeder abgelaufene Lock geloescht. Damit ist ein 'Extend' nicht mehr wirklich machbar.
parent eafeaaee
......@@ -122,12 +122,6 @@ class Dirty {
// Look for already existing dirty record.
$recordDirty = $this->getRecordDirty($tableName, $recordId);
// Check if the record is timed out - owner doesn't matter.
if (count($recordDirty) != 0 && $recordDirty[DIRTY_EXPIRE] < date('Y-m-d H:i:s')) {
$this->deleteDirtyRecord($recordDirty[COLUMN_ID]);
$recordDirty = array();
}
if (count($recordDirty) == 0) {
if ($formDirtyMode == DIRTY_MODE_NONE) {
$answer = [API_STATUS => 'success', API_MESSAGE => ''];
......@@ -156,6 +150,12 @@ class Dirty {
$recordDirty = $this->db->sql("SELECT * FROM Dirty AS d WHERE d.tableName LIKE ? AND recordId=? ",
ROW_EXPECT_0_1, [$tableName, $recordId]);
// Check if the record is timed out - owner doesn't matter.
if (isset($recordDirty[DIRTY_EXPIRE]) && $recordDirty[DIRTY_EXPIRE] < date('Y-m-d H:i:s')) {
$this->deleteDirtyRecord($recordDirty[COLUMN_ID]);
$recordDirty = array();
}
return $recordDirty;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment