- Timestamp:
- 07/23/08 17:18:26 (4 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/centreon/www/include/configuration/configObject/host/DB-Func.php
r5850 r5851 661 661 * this function cleans all the services that were linked to the removed host template 662 662 */ 663 function deleteHostServiceMultiTemplate($hID, $scndHID, $host_list ){663 function deleteHostServiceMultiTemplate($hID, $scndHID, $host_list, $antiLoop = NULL){ 664 664 global $pearDB, $path, $oreon; 665 665 666 if (isset($antiLoop[$scndHID]) && $antiLoop[$scndHID]) { 667 return 0; 668 } 666 669 $DBRESULT3 =& $pearDB->query("SELECT service_service_id " . 667 670 "FROM `service` svc, `host_service_relation` hsr " . … … 710 713 print "DB Error : ".$DBRESULT4->getDebugInfo()."<br />"; 711 714 } 712 deleteHostServiceMultiTemplate($hID, $result["host_tpl_id"], $host_list); 715 $antiLoop[$scndHID] = 1; 716 deleteHostServiceMultiTemplate($hID, $result["host_tpl_id"], $host_list, $antiLoop); 713 717 } 714 718 } … … 1370 1374 } 1371 1375 1372 function generateHostServiceMultiTemplate($hID, $hID2 = NULL ){1376 function generateHostServiceMultiTemplate($hID, $hID2 = NULL, $antiLoop = NULL){ 1373 1377 global $pearDB, $path, $oreon; 1374 1378 1379 if (isset($antiLoop[$hID2]) && $antiLoop[$hID2]) { 1380 return 0; 1381 } 1375 1382 $rq = "SELECT host_tpl_id FROM `host_template_relation` WHERE host_host_id = " . $hID2; 1376 1383 $DBRESULT =& $pearDB->query($rq); … … 1394 1401 } 1395 1402 } 1396 generateHostServiceMultiTemplate($hID, $hTpl['host_tpl_id']); 1403 $antiLoop[$hID2] = 1; 1404 generateHostServiceMultiTemplate($hID, $hTpl['host_tpl_id'], $antiLoop); 1397 1405 } 1398 1406 }
