N°1260 every classes creating a mysqli instance now use a dedicated method in CMDBSource

SVN:trunk[5309]
This commit is contained in:
Pierre Goiffon
2018-02-08 14:21:33 +00:00
parent d2f0deec9c
commit 37232bc222
4 changed files with 116 additions and 78 deletions

View File

@@ -1,6 +1,6 @@
<?php
// Copyright (C) 2017 Combodo SARL
// Copyright (C) 2017-2018 Combodo SARL
//
// This file is part of iTop.
//
@@ -21,7 +21,7 @@
* iTop Hub Launch Page
* Collect the information to be posted to iTopHub
*
* @copyright Copyright (c) 2017 Combodo SARL
* @copyright Copyright (c) 2017-2018 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
@@ -127,11 +127,7 @@ function collect_configuration()
);
// Database information
$class = new ReflectionClass('CMDBSource');
$m_oMysqli_property = $class->getProperty('m_oMysqli');
$m_oMysqli_property->setAccessible(true);
$m_oMysqli = $m_oMysqli_property->getValue();
$m_oMysqli = CMDBSource::GetMysqli();
$aConfiguration['database_settings']['server'] = (string) $m_oMysqli->server_version;
$aConfiguration['database_settings']['client'] = (string) $m_oMysqli->client_version;