diff --git a/setup/ModuleInstallationRepository.php b/setup/ModuleInstallationRepository.php index f98011dd5..63bd984d4 100644 --- a/setup/ModuleInstallationRepository.php +++ b/setup/ModuleInstallationRepository.php @@ -95,8 +95,17 @@ SQL; $aSelectInstall = CMDBSource::QueryToArray($sSQLQuery); } catch (MySQLException $e) { // No database or erroneous information - $this->log_error('Can not connect to the database: host: '.$oConfig->Get('db_host').', user:'.$oConfig->Get('db_user').', pwd:'.$oConfig->Get('db_pwd').', db name:'.$oConfig->Get('db_name')); - $this->log_error('Exception '.$e->getMessage()); + SetupLog::Error( + 'Can not connect to the database', + null, + [ + 'host' => $oConfig->Get('db_host'), + 'user' => $oConfig->Get('db_user'), + 'pwd:' => $oConfig->Get('db_pwd'), + 'db name' => $oConfig->Get('db_name'), + 'msg' => $e->getMessage(), + ] + ); return false; } @@ -129,7 +138,8 @@ SQL; // so assume that the datamodel version is equal to the application version $aResult['datamodel_version'] = $aResult['product_version']; } - $this->log_info("GetApplicationVersion returns: product_name: ".$aResult['product_name'].', product_version: '.$aResult['product_version']); + + SetupLog::Info(__METHOD__, null, ["product_name" => $aResult['product_name'], "product_version" => $aResult['product_version']]); return empty($aResult) ? false : $aResult; } diff --git a/setup/ajax.dataloader.php b/setup/ajax.dataloader.php index 3e9f498c1..50dae5701 100644 --- a/setup/ajax.dataloader.php +++ b/setup/ajax.dataloader.php @@ -127,7 +127,7 @@ header("Expires: Fri, 17 Jul 1970 05:00:00 GMT"); // Date in the past /** * Main program */ -$sOperation = Utils::ReadParam('operation', ''); +$sOperation = utils::ReadParam('operation', ''); try { SetupUtils::CheckSetupToken(); @@ -164,7 +164,7 @@ try { break; case 'toggle_use_symbolic_links': - $sUseSymbolicLinks = Utils::ReadParam('bUseSymbolicLinks', false); + $sUseSymbolicLinks = utils::ReadParam('bUseSymbolicLinks', false); $bUseSymbolicLinks = ($sUseSymbolicLinks === 'true'); MFCompiler::SetUseSymbolicLinksFlag($bUseSymbolicLinks); echo "toggle useSymbolicLinks flag : $bUseSymbolicLinks"; diff --git a/setup/email.test.php b/setup/email.test.php index 184a2124a..e5df5a275 100644 --- a/setup/email.test.php +++ b/setup/email.test.php @@ -34,7 +34,7 @@ require_once(APPROOT.'/application/startup.inc.php'); require_once(APPROOT.'/application/loginwebpage.class.inc.php'); LoginWebPage::DoLogin(true); // Check user rights and prompt if needed (must be admin) -$sOperation = Utils::ReadParam('operation', 'step1'); +$sOperation = utils::ReadParam('operation', 'step1'); $oP = new SetupPage('iTop email test utility'); // Although this page doesn't expose sensitive info, with it we can send multiple emails @@ -208,7 +208,7 @@ function DisplayStep2(SetupPage $oP, $sFrom, $sTo) $oP->add("
Sending an email to '".htmlentities($sTo, ENT_QUOTES, 'utf-8')."'... (From: '".htmlentities($sFrom, ENT_QUOTES, 'utf-8')."')
\n"); $oP->add("