#587: data insertion in glpi_history
------------------------------------+---------------------------------------
 Reporter:  [EMAIL PROTECTED]  |       Owner:  anonymous
     Type:  bug                     |      Status:  new      
 Priority:  normal                  |   Milestone:           
Component:  Autre                   |     Version:  0.65     
 Severity:  crash                   |    Keywords:           
------------------------------------+---------------------------------------
 hello,

 my configuration is apache 2 on windows xppro sp2 with php 5.1 and mysql
 5.1
 when inserting an internal device in a computer the log function
 historyLog
 crashes the script.

 I solved the trouble by changing the following line
 $query = "INSERT INTO glpi_history  VALUES
 
('','$id_device','$device_type','$device_internal_type','$device_internal_action','".
 
addslashes(getUserName($_SESSION["glpiID"],$link=0))."','$date_mod','$id_search_option','$old_value','$new_value');";

 to
 $query = "INSERT INTO glpi_history  VALUES
 
(NULL,'$id_device','$device_type','$device_internal_type','$device_internal_action','".
 
addslashes(getUserName($_SESSION["glpiID"],$link=0))."','$date_mod','$id_search_option','$old_value','$new_value');";

 the difference is in the first field:
 I changed '' by NULL

 thank you for this application

 thierry

-- 
Ticket URL: <https://dev.indepnet.net:8080/glpi/ticket/587>
GLPI <https://dev.indepnet.net:8080/glpi/>
Gestion Libre de Parc Informatique
_______________________________________________
Glpi-bugtrack mailing list
[email protected]
https://mail.gna.org/listinfo/glpi-bugtrack

Répondre à