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
6d6a10a9
Commit
6d6a10a9
authored
Jan 10, 2017
by
Carsten Rose
Browse files
Store.php: 'New record' problem "missing parameter due to fake SIP" fixed.
parent
ef81eb0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/store/Store.php
View file @
6d6a10a9
...
...
@@ -568,7 +568,12 @@ class Store {
$recordId
=
0
;
}
$tmpParam
=
[
SIP_RECORD_ID
=>
$recordId
,
SIP_FORM
=>
$formName
];
// If there are existing SIP param, keep them by copying to the new SIP Param Array
$tmpParam
=
self
::
getNonSystemSipParam
();
$tmpParam
[
SIP_RECORD_ID
]
=
$recordId
;
$tmpParam
[
SIP_FORM
]
=
$formName
;
if
(
$recordId
==
0
)
{
// SIPs for 'new records' needs to be uniq per TAB! Therefore add a uniq parameter
$tmpParam
[
SIP_MAKE_URLPARAM_UNIQ
]
=
uniqid
();
...
...
@@ -588,12 +593,32 @@ class Store {
}
/**
* Returns a pointer to this class.
*
* @return null|Sip
* Return an array with non system SIP parameter. Take the whole STORE_SIP and search for non system parameter.
* @return array
* @throws UserFormException
* @throws \qfq\CodeException
*/
public
static
function
getSipInstance
()
{
return
self
::
$sip
;
private
static
function
getNonSystemSipParam
()
{
$tmpParam
=
array
();
$sipArray
=
self
::
getStore
(
STORE_SIP
);
foreach
(
$sipArray
as
$key
=>
$value
)
{
if
(
$key
[
0
]
===
'_'
)
{
continue
;
}
switch
(
$key
)
{
case
SIP_SIP
:
case
SIP_RECORD_ID
:
case
SIP_FORM
;
case
SIP_URLPARAM
:
continue
;
default
:
$tmpParam
[
$key
]
=
$value
;
}
}
return
$tmpParam
;
}
/**
...
...
@@ -619,6 +644,14 @@ class Store {
return
array
();
}
/**
* Returns a pointer to this class.
*
* @return null|Sip
*/
public
static
function
getSipInstance
()
{
return
self
::
$sip
;
}
/**
* Fills STORE_TABLE_DEFAULT and STORE_TABLE_COLUMN_TYPES
...
...
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