Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
cdc0df99
Commit
cdc0df99
authored
Jan 13, 2020
by
Carsten Rose
Browse files
Merge remote-tracking branch 'origin/master'
parents
ea7aae15
07e2e200
Pipeline
#3130
passed with stages
in 1 minute and 49 seconds
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
extension/Classes/Core/Save.php
View file @
cdc0df99
...
...
@@ -243,6 +243,7 @@ class Save {
private
function
elements
(
$recordId
)
{
$columnCreated
=
false
;
$columnModified
=
false
;
$realColumnFound
=
false
;
$newValues
=
array
();
...
...
@@ -260,6 +261,7 @@ class Save {
// Skip Upload Elements: those will be processed later.
if
(
$this
->
isColumnUploadField
(
$column
))
{
$realColumnFound
=
true
;
continue
;
}
...
...
@@ -285,10 +287,14 @@ class Save {
Support
::
setIfNotSet
(
$formValues
,
$column
);
}
$newValues
[
$column
]
=
$formValues
[
$column
];
$realColumnFound
=
true
;
}
if
(
$columnModified
&&
!
empty
(
$newValues
)
&&
!
isset
(
$newValues
[
COLUMN_MODIFIED
]))
{
// Only save record if real columns exist.
if
(
$realColumnFound
)
{
if
(
$columnModified
&&
!
isset
(
$newValues
[
COLUMN_MODIFIED
]))
{
$newValues
[
COLUMN_MODIFIED
]
=
date
(
'YmdHis'
);
}
...
...
@@ -296,18 +302,16 @@ class Save {
if
(
$columnCreated
&&
!
isset
(
$newValues
[
COLUMN_CREATED
]))
{
$newValues
[
COLUMN_CREATED
]
=
date
(
'YmdHis'
);
}
$rc
=
$this
->
insertRecord
(
$this
->
formSpec
[
F_TABLE_NAME
],
$newValues
);
$recordId
=
$this
->
insertRecord
(
$this
->
formSpec
[
F_TABLE_NAME
],
$newValues
);
}
else
{
if
(
!
empty
(
$newValues
))
{
$this
->
updateRecord
(
$this
->
formSpec
[
F_TABLE_NAME
],
$newValues
,
$recordId
,
$this
->
formSpec
[
F_PRIMARY_KEY
]);
}
$rc
=
$recordId
;
}
$this
->
nativeDoSlave
(
$r
c
);
$this
->
nativeDoSlave
(
$r
ecordId
);
return
$r
c
;
return
$r
ecordId
;
}
/**
...
...
Write
Preview
Supports
Markdown
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