Changeset 5913
- Timestamp:
- 07/25/08 10:37:11 (4 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/centreon/www/include/configuration/configObject/host/DB-Func.php
r5890 r5913 398 398 updateNagiosServerRelation($host_id, $ret); 399 399 global $form; 400 $ret = $form->getSubmitValues(); 401 if (isset($ret["dupSvTplAssoc"]["dupSvTplAssoc"]) && $ret["dupSvTplAssoc"]["dupSvTplAssoc"] && $ret["host_template_model_htm_id"] )400 $ret = $form->getSubmitValues(); 401 if (isset($ret["dupSvTplAssoc"]["dupSvTplAssoc"]) && $ret["dupSvTplAssoc"]["dupSvTplAssoc"] && $ret["host_template_model_htm_id"] && $oreon->user->get_version() < 3) 402 402 createHostTemplateService($host_id, $ret["host_template_model_htm_id"]); 403 elseif( $oreon->user->get_version() >= 3) {403 elseif(isset($ret["dupSvTplAssoc"]["dupSvTplAssoc"]) && $ret["dupSvTplAssoc"]["dupSvTplAssoc"] && $oreon->user->get_version() >= 3) { 404 404 createHostTemplateService($host_id); 405 405 } … … 1378 1378 return 0; 1379 1379 } 1380 if (file_exists($path."../service/DB-Func.php")) 1381 require_once($path."../service/DB-Func.php"); 1382 else if (file_exists($path."../configObject/service/DB-Func.php")) 1383 require_once($path."../configObject/service/DB-Func.php"); 1380 1384 $rq = "SELECT host_tpl_id FROM `host_template_relation` WHERE host_host_id = " . $hID2; 1381 1385 $DBRESULT =& $pearDB->query($rq); … … 1409 1413 if (file_exists($path."../service/DB-Func.php")) 1410 1414 require_once($path."../service/DB-Func.php"); 1411 else if (file_exists($path."../ service/DB-Func.php"))1415 else if (file_exists($path."../configObject/service/DB-Func.php")) 1412 1416 require_once($path."../configObject/service/DB-Func.php"); 1413 # If we select a host template model, we create the services linked to this host template model 1417 # If we select a host template model, we create the services linked to this host template model 1414 1418 if ($oreon->user->get_version() < 3) { 1415 1419 if ($htm_id) { … … 1458 1462 } 1459 1463 } 1460 else { 1461 generateHostServiceMultiTemplate($host_id, $host_id); 1464 else { 1465 global $form; 1466 $ret = $form->getSubmitValues(); 1467 if (isset($ret["dupSvTplAssoc"]["dupSvTplAssoc"]) && $ret["dupSvTplAssoc"]["dupSvTplAssoc"]) 1468 generateHostServiceMultiTemplate($host_id, $host_id); 1462 1469 } 1463 1470 } … … 1494 1501 } 1495 1502 else if ($oreon->user->get_version() >= 3) { 1496 generateHostServiceMultiTemplate($host_id, $host_id); 1503 if (isset($ret["dupSvTplAssoc"]["dupSvTplAssoc"]) && $ret["dupSvTplAssoc"]["dupSvTplAssoc"]) 1504 generateHostServiceMultiTemplate($host_id, $host_id); 1497 1505 } 1498 1506 } … … 1531 1539 } 1532 1540 else if ($oreon->user->get_version() >= 3){ 1533 generateHostServiceMultiTemplate($host_id, $host_id); 1541 if (isset($ret["dupSvTplAssoc"]["dupSvTplAssoc"]) && $ret["dupSvTplAssoc"]["dupSvTplAssoc"]) 1542 generateHostServiceMultiTemplate($host_id, $host_id); 1534 1543 } 1535 1544 }
