N°4756 - Fix DBInsert/NoReload call order

This commit is contained in:
Eric Espie
2022-09-21 18:08:44 +02:00
parent 2e39a650eb
commit b9d865f881
4 changed files with 9 additions and 13 deletions

View File

@@ -4435,15 +4435,7 @@ HTML;
*/
public function DBInsertNoReload()
{
return $this->DBInsert();
}
/**
* @inheritdoc
*/
public function DBInsert()
{
$res = parent::DBInsert();
$res = parent::DBInsertNoReload();
$this->SetWarningsAsSessionMessages('create');

View File

@@ -2815,9 +2815,9 @@ abstract class DBObject implements iDisplay
* @internal
*
*/
public function DBInsertNoReload()
public function DBInsert()
{
return $this->DBInsert();
return $this->DBInsertNoReload();
}
/**
@@ -2943,7 +2943,7 @@ abstract class DBObject implements iDisplay
* @throws \MySQLException
* @throws \OQLException
*/
public function DBInsert()
public function DBInsertNoReload()
{
$sClass = get_class($this);
if (MetaModel::DBIsReadOnly())

View File

@@ -261,6 +261,7 @@
<replaces>Attachment::AfterUpdate</replaces>
<sources>
<source id="Attachment">Attachment</source>
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
</sources>
<event_data>
<event_datum id="object">
@@ -282,6 +283,7 @@
<replaces>Attachment::AfterUpdate</replaces>
<sources>
<source id="Attachment">Attachment</source>
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
</sources>
<event_data>
<event_datum id="object">

View File

@@ -3,7 +3,9 @@
<events>
<event id="EVENT_SERVICE_DISPLAY_OBJECT_DETAILS" _delta="define">
<description>An object details is about to be displayed to a user</description>
<available_filters>Class hierarchy of the displayed object</available_filters>
<sources>
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
</sources>
<arguments>
<argument id="object">
<description>The object displayed</description>