Commit 1a63db46 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge branch 'B7903DeleteWithTable' into 'master'

B7903 Delete mit table= als parameter funktioniert nicht mehr.

See merge request !157
parents f6ea486e e1de5c59
Pipeline #1995 passed with stages
in 2 minutes and 44 seconds
...@@ -348,6 +348,7 @@ class QuickFormQuery { ...@@ -348,6 +348,7 @@ class QuickFormQuery {
$data = ''; $data = '';
$foundInStore = ''; $foundInStore = '';
$flagApiStructureReGroup = true; $flagApiStructureReGroup = true;
$formModeNew = '';
$recordId = $this->store->getVar(SIP_RECORD_ID, STORE_SIP . STORE_TYPO3 . STORE_CLIENT . STORE_ZERO); $recordId = $this->store->getVar(SIP_RECORD_ID, STORE_SIP . STORE_TYPO3 . STORE_CLIENT . STORE_ZERO);
$this->setParameterLanguageFieldName(); $this->setParameterLanguageFieldName();
...@@ -360,6 +361,7 @@ class QuickFormQuery { ...@@ -360,6 +361,7 @@ class QuickFormQuery {
if ($formName === false) { if ($formName === false) {
switch ($formMode) { switch ($formMode) {
case FORM_DELETE: case FORM_DELETE:
$formModeNew = FORM_DELETE;
break; break;
case FORM_DRAG_AND_DROP: case FORM_DRAG_AND_DROP:
throw new CodeException('Missing form in SIP', ERROR_MISSING_FORM); throw new CodeException('Missing form in SIP', ERROR_MISSING_FORM);
...@@ -369,7 +371,9 @@ class QuickFormQuery { ...@@ -369,7 +371,9 @@ class QuickFormQuery {
} }
// Check 'session expire' happens quite late, cause it can be configured per form. // Check 'session expire' happens quite late, cause it can be configured per form.
if ($formName !== false) {
Session::checkSessionExpired($this->formSpec[F_SESSION_TIMEOUT_SECONDS]); Session::checkSessionExpired($this->formSpec[F_SESSION_TIMEOUT_SECONDS]);
}
// Fill STORE_FORM: might need Form.fillStoreVar={{!SELECT ...}}) to provide STORE_VAR - therefore the FORM-definition should already been processed. #8058 // Fill STORE_FORM: might need Form.fillStoreVar={{!SELECT ...}}) to provide STORE_VAR - therefore the FORM-definition should already been processed. #8058
switch ($formMode) { switch ($formMode) {
...@@ -398,6 +402,7 @@ class QuickFormQuery { ...@@ -398,6 +402,7 @@ class QuickFormQuery {
$this->formSpec[F_TABLE_NAME] = $table; $this->formSpec[F_TABLE_NAME] = $table;
$this->formSpec[F_RECORD_LOCK_TIMEOUT_SECONDS] = 1; // just indicate a timeout, the exact timeout is stored in the dirty record. $this->formSpec[F_RECORD_LOCK_TIMEOUT_SECONDS] = 1; // just indicate a timeout, the exact timeout is stored in the dirty record.
$this->formSpec[F_DIRTY_MODE] = DIRTY_MODE_EXCLUSIVE; // just set a mode,, the exact mode is stored in the dirty record. $this->formSpec[F_DIRTY_MODE] = DIRTY_MODE_EXCLUSIVE; // just set a mode,, the exact mode is stored in the dirty record.
$this->formSpec[F_PRIMARY_KEY] = F_PRIMARY_KEY_DEFAULT;
$tmpDbIndexData = $this->store->getVar(PARAM_DB_INDEX_DATA, STORE_SIP); $tmpDbIndexData = $this->store->getVar(PARAM_DB_INDEX_DATA, STORE_SIP);
if (!empty($tmpDbIndexData)) { if (!empty($tmpDbIndexData)) {
...@@ -419,7 +424,7 @@ class QuickFormQuery { ...@@ -419,7 +424,7 @@ class QuickFormQuery {
} }
// Fill STORE_BEFORE // Fill STORE_BEFORE
if ($this->store->getVar($this->formSpec[F_PRIMARY_KEY], STORE_BEFORE) === false) { if ($formName !== false && $this->store->getVar($this->formSpec[F_PRIMARY_KEY], STORE_BEFORE) === false) {
$this->store->fillStoreWithRecord($this->formSpec[F_TABLE_NAME], $recordId, $this->store->fillStoreWithRecord($this->formSpec[F_TABLE_NAME], $recordId,
$this->dbArray[$this->dbIndexData], $this->formSpec[F_PRIMARY_KEY], STORE_BEFORE); $this->dbArray[$this->dbIndexData], $this->formSpec[F_PRIMARY_KEY], STORE_BEFORE);
} }
......
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