Changeset 6734

Show
Ignore:
Timestamp:
10/06/08 16:35:23 (2 months ago)
Author:
jmathis
Message:

remove PHP warning in configuration files generation

Location:
trunk/centreon/www/include/configuration/configGenerate
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/centreon/www/include/configuration/configGenerate/formGenerateFiles.php

    r6718 r6734  
    139139                                                mkdir($nagiosCFGPath.$tab['id']."/"); 
    140140                                         
    141                                         print "<br>=================== Generation de ".$tab['id']."==================<br>"; 
    142                                  
    143141                                        unset($DBRESULT2); 
    144142                                        require $path."genCGICFG.php"; 
  • trunk/centreon/www/include/configuration/configGenerate/genHosts.php

    r6718 r6734  
    173173                                 * Check Period 
    174174                                 */ 
    175                                 if ($host["host_register"] == 1 && (!$host["timeperiod_tp_id1"] || $host["host_location"] != 0)) 
     175                                if ($host["host_register"] == 1 && (!isset($host["timeperiod_tp_id1"]) || $host["host_location"] != 0)) 
    176176                                        $host["timeperiod_tp_id"] = getMyHostField($host["host_id"], "timeperiod_tp_id"); 
    177177                                if ($host["timeperiod_tp_id"]) 
  • trunk/centreon/www/include/configuration/configGenerate/genServices.php

    r6718 r6734  
    215215                                                                 */ 
    216216                                                                 
    217                                                                 if (!$service["timeperiod_tp_id"]) { 
     217                                                                if (!$service["timeperiod_tp_id"])  
    218218                                                                        $service["timeperiod_tp_id"] = getMyServiceField($service["service_id"], "timeperiod_tp_id");    
    219                                                                         $strTMP .= print_line("check_period", $timeperiods[$service["timeperiod_tp_id"]]."_GMT".$gmt); 
    220                                                                 } 
     219                                                                $strTMP .= print_line("check_period", $timeperiods[$service["timeperiod_tp_id"]]."_GMT".$gmt); 
     220 
    221221                                                                if ($service["service_parallelize_check"] != 2)  
    222222                                                                        $strTMP .= print_line("parallelize_check", $service["service_parallelize_check"] == 1 ? "1": "0"); 
     
    253253                                                                 * Notifications 
    254254                                                                 */ 
    255                                                                 if (!$service["timeperiod_tp_id2"]) { 
    256                                                                         $service["timeperiod_tp_id2"] = $service["timeperiod_tp_id"] = getMyServiceField($service["service_id"], "timeperiod_tp_id");    
    257                                                                         $strTMP .= print_line("notification_period", $timeperiods[$service["timeperiod_tp_id2"]]."_GMT".$gmt); 
    258                                                                 } 
     255                                                                if (!$service["timeperiod_tp_id2"]) 
     256                                                                        $service["timeperiod_tp_id2"] = $service["timeperiod_tp_id"] = getMyServiceField($service["service_id"], "timeperiod_tp_id"); 
     257                                                                $strTMP .= print_line("notification_period", $timeperiods[$service["timeperiod_tp_id2"]]."_GMT".$gmt); 
     258 
    259259                                                                if ($service["service_notification_interval"] != NULL)  
    260260                                                                        $strTMP .= print_line("notification_interval", $service["service_notification_interval"]);