@@ -40,8 +40,7 @@ discard block |
||
| 40 | 40 | } |
| 41 | 41 | $this->getLogging()->log($message,$log_level); |
| 42 | 42 | return false; |
| 43 | - } |
|
| 44 | - else |
|
| 43 | + } else |
|
| 45 | 44 | { |
| 46 | 45 | $option_var=$option_array[$option_category][$option_name]; |
| 47 | 46 | return true; |
@@ -54,9 +53,11 @@ discard block |
||
| 54 | 53 | protected function getDatabaseOptions() |
| 55 | 54 | { |
| 56 | 55 | // Database options |
| 57 | - if ($this->logSetup === false) // Only if logging was no setup in constructor |
|
| 56 | + if ($this->logSetup === false) { |
|
| 57 | + // Only if logging was no setup in constructor |
|
| 58 | 58 | { |
| 59 | 59 | $this->getDBConfigIfSet('log_level',$this->getLogging()->debugLevel); |
| 60 | + } |
|
| 60 | 61 | $this->getDBConfigIfSet('log_destination',$this->getLogging()->outputMode); |
| 61 | 62 | $this->getDBConfigIfSet('log_file',$this->getLogging()->outputFile); |
| 62 | 63 | } |
@@ -69,7 +70,9 @@ discard block |
||
| 69 | 70 | protected function getDBConfigIfSet($element,&$variable) |
| 70 | 71 | { |
| 71 | 72 | $value=$this->getDBConfig($element); |
| 72 | - if ($value != null) $variable=$value; |
|
| 73 | + if ($value != null) { |
|
| 74 | + $variable=$value; |
|
| 75 | + } |
|
| 73 | 76 | } |
| 74 | 77 | |
| 75 | 78 | /** |
@@ -106,8 +109,7 @@ discard block |
||
| 106 | 109 | { |
| 107 | 110 | $this->getLogging()->log('Unknown node status '.$nodeStatus.' : setting to MASTER',WARN); |
| 108 | 111 | $this->getTrapApi()->setStatusMaster(); |
| 109 | - } |
|
| 110 | - else |
|
| 112 | + } else |
|
| 111 | 113 | { |
| 112 | 114 | if ($this->getTrapApi()->getStatus() != TrapApi::MASTER) |
| 113 | 115 | { |
@@ -175,7 +177,10 @@ discard block |
||
| 175 | 177 | |
| 176 | 178 | //TODO enable this again when API queries are all done : $this->logging->log("API Use : ".print_r($this->apiUse,true),INFO ); |
| 177 | 179 | |
| 178 | - if ($this->apiUse === true) return; // In case of API use, no IDO is necessary |
|
| 180 | + if ($this->apiUse === true) { |
|
| 181 | + return; |
|
| 182 | + } |
|
| 183 | + // In case of API use, no IDO is necessary |
|
| 179 | 184 | |
| 180 | 185 | // IDO Database |
| 181 | 186 | if (!array_key_exists('IDOdatabase',$trapConfig['config'])) |