diff --git a/lib/yform.php b/lib/yform.php index 6c86bc5ea..1ec588524 100644 --- a/lib/yform.php +++ b/lib/yform.php @@ -452,6 +452,7 @@ public function executeActions() /** @deprecated use 'id' instead of 'ID' */ $this->objparams['value_pool']['email']['ID'] = $this->objparams['main_id']; $this->objparams['value_pool']['email']['id'] = $this->objparams['main_id']; + $this->objparams['value_pool']['sql']['id'] = $this->objparams['main_id']; } $hasWarnings = 0 != count($this->objparams['warning']); diff --git a/lib/yform/action/db.php b/lib/yform/action/db.php index 260689593..9ef0ac31b 100644 --- a/lib/yform/action/db.php +++ b/lib/yform/action/db.php @@ -61,7 +61,10 @@ public function executeAction(): void $sql_id->setWhere($where); $sql_id->select('id'); $this->params['main_id'] = $sql_id->getValue('id'); + /** @deprecated use 'id' instead of 'ID' */ $this->params['value_pool']['email']['ID'] = $this->params['main_id']; + $this->params['value_pool']['email']['id'] = $this->params['main_id']; + $this->params['value_pool']['sql']['id'] = $this->params['main_id']; } } else { $sql->insert(); @@ -71,6 +74,7 @@ public function executeAction(): void /** @deprecated since 3.4.1 use id (lowercase) instead */ $this->params['value_pool']['email']['ID'] = $id; $this->params['value_pool']['email']['id'] = $id; + $this->params['value_pool']['sql']['id'] = $id; } } catch (Exception $e) { $this->params['form_show'] = true; diff --git a/plugins/manager/lib/yform/action/manage_db.php b/plugins/manager/lib/yform/action/manage_db.php index d9c54f5a7..7ef9fbf93 100644 --- a/plugins/manager/lib/yform/action/manage_db.php +++ b/plugins/manager/lib/yform/action/manage_db.php @@ -81,10 +81,11 @@ public function executeAction(): void $sql->insert(); $flag = 'insert'; $id = $sql->getLastId(); - + /** @deprecated use 'id' instead of 'ID' */ $this->params['value_pool']['email']['ID'] = $id; + $this->params['value_pool']['email']['id'] = $id; $this->params['main_id'] = $id; - // $this->params["value_pool"]["sql"]["ID"] = $id; + $this->params["value_pool"]["sql"]["id"] = $id; if (0 == $id) { $this->params['form_show'] = true; $this->params['hasWarnings'] = true;