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
51ea9bbb
Commit
51ea9bbb
authored
Mar 27, 2017
by
Carsten Rose
Browse files
FillStoreForm.php: replace 'name' by FE_NAME
parent
318f0f30
Changes
1
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/store/FillStoreForm.php
View file @
51ea9bbb
...
...
@@ -170,7 +170,7 @@ class FillStoreForm {
foreach
(
$this
->
feSpecNative
AS
$formElement
)
{
// Never get a predefined 'id'
if
(
$formElement
[
'name'
]
===
'id'
)
if
(
$formElement
[
FE_NAME
]
===
'id'
)
continue
;
// Preparation for Log, Debug
...
...
@@ -180,18 +180,18 @@ class FillStoreForm {
$formElement
=
$this
->
evaluate
->
parseArray
(
$formElement
,
$skip
,
$debugStack
);
// Get related formElement. Construct the field name used in the form.
$clientFieldName
=
HelperFormElement
::
buildFormElementName
(
$formElement
[
'name'
]
,
$fakeRecordId
);
$clientFieldName
=
HelperFormElement
::
buildFormElementName
(
$formElement
,
$fakeRecordId
);
// Some Defaults
$formElement
=
Support
::
setFeDefaults
(
$formElement
);
if
(
$formElement
[
FE_TYPE
]
===
FE_TYPE_EXTRA
)
{
// Extra elements will be transferred by SIP
if
(
!
isset
(
$sipValues
[
$formElement
[
'name'
]]))
{
throw
new
CodeException
(
"Missing the "
.
FE_TYPE_EXTRA
.
" field '"
.
$formElement
[
'name'
]
.
"' in SIP."
,
ERROR_MISSING_HIDDEN_FIELD_IN_SIP
);
if
(
!
isset
(
$sipValues
[
$formElement
[
FE_NAME
]]))
{
throw
new
CodeException
(
"Missing the "
.
FE_TYPE_EXTRA
.
" field '"
.
$formElement
[
FE_NAME
]
.
"' in SIP."
,
ERROR_MISSING_HIDDEN_FIELD_IN_SIP
);
}
$newValues
[
$formElement
[
'name'
]]
=
$sipValues
[
$formElement
[
'name'
]];
$newValues
[
$formElement
[
FE_NAME
]]
=
$sipValues
[
$formElement
[
FE_NAME
]];
continue
;
}
...
...
@@ -217,15 +217,15 @@ class FillStoreForm {
case
'datetime'
:
case
'time'
:
if
(
$clientValues
[
$clientFieldName
]
!==
''
)
// do not check empty values
$newValues
[
$formElement
[
'name'
]]
=
$this
->
doDateTime
(
$formElement
,
$clientValues
[
$clientFieldName
]);
$newValues
[
$formElement
[
FE_NAME
]]
=
$this
->
doDateTime
(
$formElement
,
$clientValues
[
$clientFieldName
]);
break
;
default
:
// Check only if their is something
if
(
$clientValues
[
$clientFieldName
]
!==
''
)
{
$newValues
[
$formElement
[
'name'
]]
=
Sanitize
::
sanitize
(
$clientValues
[
$clientFieldName
],
$newValues
[
$formElement
[
FE_NAME
]]
=
Sanitize
::
sanitize
(
$clientValues
[
$clientFieldName
],
$formElement
[
'checkType'
],
$formElement
[
'checkPattern'
],
SANATIZE_EXCEPTION
);
}
else
{
$newValues
[
$formElement
[
'name'
]]
=
''
;
$newValues
[
$formElement
[
FE_NAME
]]
=
''
;
}
break
;
}
...
...
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