Hello,

This is a patch for VirtualMachine.

There is a problem on Host computer want search a VM with the OID. But
in SQL request, it search with Computer id != virtualmachine id. So if
computer have same id than the virtualmachine, it will never find it.

With some investigation, this id may not be used here 


Best regards,
--
David DURIEUX
Tel : +33 (0)4.82.53.30.53
Port : +33 (0)6.34.99.45.18
Mail : d.duri...@siprossii.com
Site Web : http://www.siprossii.com/

SIPROSSII
Les LafĂ´rets
69430 Beaujeu
FRANCE
Index: computervirtualmachine.class.php
===================================================================
--- computervirtualmachine.class.php	(revision 15527)
+++ computervirtualmachine.class.php	(working copy)
@@ -425,8 +425,7 @@
 
       $query = "SELECT `id`
                 FROM `glpi_computers`
-                WHERE `id` NOT IN ('".$fields['id']."')
-                      AND LOWER(`uuid`) ".self::getUUIDRestrictRequest($fields['uuid']);
+                WHERE LOWER(`uuid`) ".self::getUUIDRestrictRequest($fields['uuid']);
       $result = $DB->query($query);
 
       //Virtual machine found, return ID
_______________________________________________
Glpi-dev mailing list
Glpi-dev@gna.org
https://mail.gna.org/listinfo/glpi-dev

Reply via email to