Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
removing debug
Browse files Browse the repository at this point in the history
  • Loading branch information
sc979 committed Jun 14, 2018
1 parent e484cad commit ce3382d
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions www/install/php/Update-2.8.23_to_2.8.24.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,6 @@
*
*/

/**
* DEBUG && TEST
*/
$test_changing = 'UPDATE cron_operation SET running = "1" WHERE name = "centAcl.php"';
$pearDB->query($test_changing);/*
$test_changing = 'UPDATE cron_operation SET running = "0" WHERE name = "centAcl.php"';
$pearDB->query($test_changing);
$lockTable = 'LOCK TABLES cron_operation WRITE';
$pearDB->query($lockTable);
$unlockTable = 'UNLOCK TABLES';
$stmt = $pearDB->query($unlockTable);
$test_changing = 'UPDATE cron_operation SET running = "1" WHERE name = "centAcl.php"';
$pearDB->query($test_changing);*/


/**
* Checking if the DB is already upgraded
*/
Expand All @@ -76,7 +58,7 @@
* Checking if centAcl.php is running and waiting for it to stop before locking cron_operation table
*/
for ($i = 0; $i < 180; $i++) {
$searchStatus = 'SELECT running FROM cron_operation WHERE name = "centAcl.php"';
$searchStatus = 'SELECT running FROM cron_operation WHERE `name` = \'centAcl.php\'';
$result = $pearDB->query($searchStatus);
$row = array();
while ($row = $result->fetchRow()) {
Expand All @@ -95,7 +77,7 @@
*/
$stmt = $pearDBO->query($unlockTable);

$searchIndex = 'SHOW INDEX FROM centreon_acl WHERE Key_name LIKE "index%"';
$searchIndex = 'SHOW INDEX FROM centreon_acl WHERE Key_name LIKE \'index%\'';
$stmt = $pearDBO->query($searchIndex);

$queryValues = array();
Expand All @@ -114,9 +96,9 @@
/**
* Updating DBs and reloading cron_operation
*/

$add_query = 'ALTER TABLE centreon_acl ADD PRIMARY KEY (`group_id`,`host_id`,`service_id`)';
$stmt = $pearDBO->query($add_query);

$stmt = $pearDB->query($unlockTable);

$updateQuery = 'UPDATE acl_groups SET acl_group_changed = 1';
Expand Down

0 comments on commit ce3382d

Please sign in to comment.