hook.php.patch

amma, 06/01/2018 01:22 PM

Download (1.34 KB)

View differences:

hook.php (working copy)
111 111
      if ($DB->fieldExists("glpi_plugin_applicatifs","state")) { // empty 1.5.0 not in update 1.5.0
112 112
         $DB->query("ALTER TABLE `glpi_plugin_applicatifs` DROP `state`");
113 113
      }
114
      if (DbUtils::isIndex("glpi_plugin_applicatifs_optvalues_machines", "optvalue_ID")) { // in empty 1.5.0 not in update 1.5.0
114
      $dbutils = new DbUtils();
115
      if ($dbutils->isIndex("glpi_plugin_applicatifs_optvalues_machines", "optvalue_ID")) { // in empty 1.5.0 not in update 1.5.0
115 116
         $DB->query("ALTER TABLE `glpi_plugin_applicatifs_optvalues_machines`
116 117
                     DROP KEY `optvalue_ID`");
117 118
      }
118 119
      $DB->runFile(GLPI_ROOT ."/plugins/appliances/sql/update-1.6.0.sql");
119 120

  
120 121
      Plugin::migrateItemType([1200 => 'PluginAppliancesAppliance'],
121
                              ["glpi_bookmarks", "glpi_bookmarks_users", "glpi_displaypreferences",
122
                              ["glpi_savedsearches", "glpi_savedsearches_users", "glpi_displaypreferences",
122 123
                               "glpi_documents_items", "glpi_infocoms", "glpi_logs",
123 124
                               "glpi_items_tickets"],
124 125
                              ["glpi_plugin_appliances_appliances_items",