Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
0d378e59
Commit
0d378e59
authored
Aug 28, 2019
by
Carsten Rose
Browse files
Merge branch '8933brokenRecordLock' into 'master'
8933broken record lock See merge request
!175
parents
780e251d
9eefd38a
Pipeline
#2268
passed with stages
in 2 minutes and 29 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Documentation-develop/CODING.md
View file @
0d378e59
...
...
@@ -280,8 +280,8 @@ FORM_LOG_EXPIRE (typically 1800 seconds).
*
Correspondig expired logfiles will be deleted.
*
Active logfiles will be filled.
Error
m
essages & Exceptions
==========================
Error
M
essages & Exceptions
==========================
=
*
Exception types:
*
Code
...
...
extension/Classes/Core/Form/Dirty.php
View file @
0d378e59
...
...
@@ -272,7 +272,8 @@ class Dirty {
$record
=
$this
->
dbArray
[
$this
->
dbIndexData
]
->
sql
(
"SELECT * FROM
$tableName
WHERE
$primaryKey
=?"
,
ROW_EXPECT_1
,
[
$recordId
],
"Record to lock not found."
);
$expire
=
date
(
'Y-m-d H:i:s'
,
strtotime
(
"+"
.
$tableVars
[
F_RECORD_LOCK_TIMEOUT_SECONDS
]
.
" seconds"
));
# Dirty workaround: setting the 'expired timestamp' minus 1 second guarantees that the client ask for relock always if the timeout is expired.
$expire
=
date
(
'Y-m-d H:i:s'
,
strtotime
(
"+"
.
$tableVars
[
F_RECORD_LOCK_TIMEOUT_SECONDS
]
-
1
.
" seconds"
));
// Write 'dirty' record
$this
->
dbArray
[
$this
->
dbIndexQfq
]
->
sql
(
"INSERT INTO Dirty (`sip`, `tableName`, `recordId`, `expire`, `recordHashMd5`, `feUser`, `qfqUserSessionCookie`, `dirtyMode`, `remoteAddress`, `created`) "
.
"VALUES ( ?,?,?,?,?,?,?,?,?,? )"
,
ROW_REGULAR
,
...
...
@@ -394,7 +395,6 @@ class Dirty {
return
$answer
;
}
if
(
$formMode
==
FORM_DELETE
)
{
// Check if the lock is timed out
if
(
$lockTimeout
>
0
&&
$rcRecordDirty
[
DIRTY_EXPIRE
]
<
date
(
'Y-m-d H:i:s'
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment