Bonjour, Il y a un soucis lors de la migration depuis la 0.72, avant on utilisait des numéros pour les itemtype, et il faut les définir en dur dans la fonction de mise à jour en 0.78.
J'ai corrigé aussi un bug dans le script CLI de migration. Voici le patch pour la 0.84 Cordialement, -- David DURIEUX Tel : +33 (0)4.82.53.30.53 Mail : d.duri...@siprossii.com Site Web : http://www.siprossii.com/ SIPROSSII Les Lafôrets 69430 Beaujeu FRANCE
Index: install/update_0723_078.php =================================================================== --- install/update_0723_078.php (revision 20823) +++ install/update_0723_078.php (working copy) @@ -2607,65 +2607,65 @@ 'Update itemtype fields')); // Convert itemtype to Class names - $typetoname = array(GENERAL_TYPE => "",// For tickets - COMPUTER_TYPE => "Computer", - NETWORKING_TYPE => "NetworkEquipment", - PRINTER_TYPE => "Printer", - MONITOR_TYPE => "Monitor", - PERIPHERAL_TYPE => "Peripheral", - SOFTWARE_TYPE => "Software", - CONTACT_TYPE => "Contact", - ENTERPRISE_TYPE => "Supplier", - INFOCOM_TYPE => "Infocom", - CONTRACT_TYPE => "Contract", - CARTRIDGEITEM_TYPE => "CartridgeItem", - TYPEDOC_TYPE => "DocumentType", - DOCUMENT_TYPE => "Document", - KNOWBASE_TYPE => "KnowbaseItem", - USER_TYPE => "User", - TRACKING_TYPE => "Ticket", - CONSUMABLEITEM_TYPE => "ConsumableItem", - CONSUMABLE_TYPE => "Consumable", - CARTRIDGE_TYPE => "Cartridge", - SOFTWARELICENSE_TYPE => "SoftwareLicense", - LINK_TYPE => "Link", - STATE_TYPE => "States", - PHONE_TYPE => "Phone", - DEVICE_TYPE => "Device", - REMINDER_TYPE => "Reminder", - STAT_TYPE => "Stat", - GROUP_TYPE => "Group", - ENTITY_TYPE => "Entity", - RESERVATION_TYPE => "ReservationItem", - AUTHMAIL_TYPE => "AuthMail", - AUTHLDAP_TYPE => "AuthLDAP", - OCSNG_TYPE => "OcsServer", - REGISTRY_TYPE => "RegistryKey", - PROFILE_TYPE => "Profile", - MAILGATE_TYPE => "MailCollector", - RULE_TYPE => "Rule", - TRANSFER_TYPE => "Transfer", - BOOKMARK_TYPE => "Bookmark", - SOFTWAREVERSION_TYPE => "SoftwareVersion", - PLUGIN_TYPE => "Plugin", - COMPUTERDISK_TYPE => "ComputerDisk", - NETWORKING_PORT_TYPE => "NetworkPort", - FOLLOWUP_TYPE => "TicketFollowup", - BUDGET_TYPE => "Budget"); + $typetoname = array(0 => "",// For tickets + 1 => "Computer", + 2 => "NetworkEquipment", + 3 => "Printer", + 4 => "Monitor", + 5 => "Peripheral", + 6 => "Software", + 7 => "Contact", + 8 => "Supplier", + 9 => "Infocom", + 10 => "Contract", + 11 => "CartridgeItem", + 12 => "DocumentType", + 13 => "Document", + 14 => "KnowbaseItem", + 15 => "User", + 16 => "Ticket", + 17 => "ConsumableItem", + 18 => "Consumable", + 19 => "Cartridge", + 20 => "SoftwareLicense", + 21 => "Link", + 22 => "States", + 23 => "Phone", + 24 => "Device", + 25 => "Reminder", + 26 => "Stat", + 27 => "Group", + 28 => "Entity", + 29 => "ReservationItem", + 30 => "AuthMail", + 31 => "AuthLDAP", + 32 => "OcsServer", + 33 => "RegistryKey", + 34 => "Profile", + 35 => "MailCollector", + 36 => "Rule", + 37 => "Transfer", + 38 => "Bookmark", + 39 => "SoftwareVersion", + 40 => "Plugin", + 41 => "ComputerDisk", + 42 => "NetworkPort", + 43 => "TicketFollowup", + 44 => "Budget"); // End is not used in 0.72.x - $devtypetoname = array(MOBOARD_DEVICE => 'DeviceMotherboard', - PROCESSOR_DEVICE => 'DeviceProcessor', - RAM_DEVICE => 'DeviceMemory', - HDD_DEVICE => 'DeviceHardDrive', - NETWORK_DEVICE => 'DeviceNetworkCard', - DRIVE_DEVICE => 'DeviceDrive', - CONTROL_DEVICE => 'DeviceControl', - GFX_DEVICE => 'DeviceGraphicCard', - SND_DEVICE => 'DeviceSoundCard', - PCI_DEVICE => 'DevicePci', - CASE_DEVICE => 'DeviceCase', - POWER_DEVICE => 'DevicePowerSupply'); + $devtypetoname = array(1 => 'DeviceMotherboard', + 2 => 'DeviceProcessor', + 3 => 'DeviceMemory', + 4 => 'DeviceHardDrive', + 5 => 'DeviceNetworkCard', + 6 => 'DeviceDrive', + 7 => 'DeviceControl', + 8 => 'DeviceGraphicCard', + 9 => 'DeviceSoundCard', + 10 => 'DevicePci', + 11 => 'DeviceCase', + 12 => 'DevicePowerSupply'); $itemtype_tables = array("glpi_alerts", "glpi_bookmarks", "glpi_bookmarks_users", "glpi_computers_items", "glpi_contracts_items", "glpi_displaypreferences", Index: tools/cliupdate.php =================================================================== --- tools/cliupdate.php (revision 20823) +++ tools/cliupdate.php (working copy) @@ -177,9 +177,6 @@ die("Bad schema\n"); } -$query = "SELECT `version`, `language` - FROM `glpi_configs`"; - $result = $DB->query($query) or die("get current version ".$DB->error()); $current_version = trim($DB->result($result,0,0)); $glpilanguage = trim($DB->result($result,0,1));
_______________________________________________ Glpi-dev mailing list Glpi-dev@gna.org https://mail.gna.org/listinfo/glpi-dev