From d714235d67f586f59b6fbbb8ba034f19a03e8008 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Mon, 1 Dec 2014 17:33:38 +0000 Subject: [PATCH] #1016: record the displayed value of the database_table_name field in the database. This happens: - when creating a new Synchro Data Source - when modifying an "old" Synchro Data Source for which the field was empty. SVN:trunk[3439] --- synchro/synchrodatasource.class.inc.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/synchro/synchrodatasource.class.inc.php b/synchro/synchrodatasource.class.inc.php index 6af39eeef..ff2508032 100644 --- a/synchro/synchrodatasource.class.inc.php +++ b/synchro/synchrodatasource.class.inc.php @@ -640,6 +640,14 @@ EOF $this->Set('attribute_list', $oAttributeSet); } } + else + { + $sDataTable = $this->Get('database_table_name'); + if (empty($sDataTable)) + { + $this->Set('database_table_name', $this->ComputeDataTableName()); + } + } } public function DoCheckToWrite() { @@ -761,6 +769,14 @@ EOF { CMDBSource::Query($sTriggerSQL); } + + $sDataTable = $this->Get('database_table_name'); + if (empty($sDataTable)) + { + $this->Set('database_table_name', $this->ComputeDataTableName()); + $this->DBUpdate(); + } + } /**