Skip to content
This repository was archived by the owner on Dec 13, 2022. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e7b1f5c
style : minor typo changes
sc979 Dec 24, 2019
966d3b0
enh: exception management
sc979 Jan 3, 2020
dbb7cb3
enh: remove exception code thrown
sc979 Jan 3, 2020
709283e
enh: replace thrown object with error message
sc979 Jan 3, 2020
6d09507
enh: add a specific log file for the update
sc979 Jan 3, 2020
a5b360a
replace PDOException with parent
sc979 Jan 3, 2020
9e066b3
remove erro message duplication
sc979 Jan 3, 2020
93eea14
restore queries
sc979 Jan 3, 2020
1ac83a1
restore queries
sc979 Jan 3, 2020
3b0c408
typo correction
sc979 Jan 3, 2020
c679e7e
Update www/install/php/Update-20.04.0-beta.1.php
kduret Jan 6, 2020
abdcae2
Update www/install/php/Update-20.04.0-beta.1.php
kduret Jan 6, 2020
cc0218a
Update www/install/php/Update-20.04.0-beta.1.php
kduret Jan 6, 2020
8c9fba6
Update www/install/php/Update-20.04.0-beta.1.php
kduret Jan 6, 2020
3571210
Update www/install/php/Update-20.04.0-beta.1.php
kduret Jan 6, 2020
0992da8
fix(msg): move the errorMessage displayed before the thrown exception
sc979 Jan 6, 2020
1bbc1e4
enh: displayed warning on step4
sc979 Jan 6, 2020
adcbab5
enh: improve comments
sc979 Jan 7, 2020
faa0843
Update www/install/php/Update-20.04.0-beta.1.php
sc979 Jan 7, 2020
654fac5
enh(update): generate gorgone conf file on update
sc979 Jan 7, 2020
0b2e4db
Merge branch 'MON-gorgone-integration' into MON-4403-migrate-centreon…
sc979 Jan 7, 2020
f3af174
enh: moving transaction() before first exception
sc979 Jan 7, 2020
63e9f0f
fix(translation): avoid empty gettext translation
sc979 Jan 9, 2020
837d63b
Merge branch 'MON-gorgone-integration' into MON-4403-migrate-centreon…
sc979 Jan 14, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
enh: improve comments
  • Loading branch information
sc979 committed Jan 7, 2020
commit adcbab5b530a7d8982c868454ec8efc4308097a1
14 changes: 6 additions & 8 deletions www/install/php/Update-20.04.0-beta.1.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
$errorMessage = '';

/**
* @internal : Queries needing exception management and rollback if failing
* Queries needing exception management and rollback if failing
*/
try {
$pearDB->beginTransaction();
/*
* Move broker xml files to json format
*/
$errorMessage = "Unable to upgrade broker configuration from xml format to json format";
$errorMessage = "Unable to replace broker configuration from xml format to json format";
$result = $pearDB->query(
"SELECT config_id, config_filename
FROM cfg_centreonbroker"
Expand All @@ -55,14 +55,12 @@
$statement->bindValue(':id', $row['config_id'], \PDO::PARAM_INT);

$statement->execute();
// saving error message to be thrown in case of failure

}

/*
* Move engine module xml files to json format
*/
$errorMessage = "Unable to upgrade engine's broker modules configuration from xml to json format";
$errorMessage = "Unable to replace engine's broker modules configuration from xml to json format";
$result = $pearDB->query(
"SELECT bk_mod_id, broker_module
FROM cfg_nagios_broker_module"
Expand Down Expand Up @@ -140,9 +138,9 @@
throw new \Exception($versionOfTheUpgrade . $errorMessage, (int)$e->getCode(), $e);
}

/*
* @internal : Queries which don't need rollback and won't throw an exception
*/
/**
* Queries which don't need rollback and won't throw an exception
*/
try {
/*
* replace autologin keys using NULL instead of empty string
Expand Down