Commit a9413009 authored by Johan Cwiklinski's avatar Johan Cwiklinski
Browse files

Fix getJsonFilePath arguments

parent 91d005a2
...@@ -580,7 +580,7 @@ class NetworkPort extends InventoryAsset ...@@ -580,7 +580,7 @@ class NetworkPort extends InventoryAsset
if (isset($exploded[2])) { if (isset($exploded[2])) {
if (!$GLPI_CACHE->has('glpi_inventory_ouis')) { if (!$GLPI_CACHE->has('glpi_inventory_ouis')) {
$jsonfile = new FilesToJSON(); $jsonfile = new FilesToJSON();
$ouis = json_decode(file_get_contents($jsonfile->getJsonFilePath('oui')), true); $ouis = json_decode(file_get_contents($jsonfile->getJsonFilePath('ouis')), true);
$GLPI_CACHE->set('glpi_inventory_ouis', $ouis); $GLPI_CACHE->set('glpi_inventory_ouis', $ouis);
} }
$ouis = $ouis ?? $GLPI_CACHE->get('glpi_inventory_ouis'); $ouis = $ouis ?? $GLPI_CACHE->get('glpi_inventory_ouis');
......
...@@ -95,7 +95,7 @@ class PCIVendor extends CommonDropdown implements CacheableListInterface { ...@@ -95,7 +95,7 @@ class PCIVendor extends CommonDropdown implements CacheableListInterface {
} }
$jsonfile = new FilesToJSON(); $jsonfile = new FilesToJSON();
$file_pciids = json_decode(file_get_contents($jsonfile->getJsonFilePath('pci')), true); $file_pciids = json_decode(file_get_contents($jsonfile->getJsonFilePath('pciid')), true);
$db_pciids = $vendors->getDbList(); $db_pciids = $vendors->getDbList();
$pciids = $db_pciids + $file_pciids; $pciids = $db_pciids + $file_pciids;
$GLPI_CACHE->set($vendors->cache_key, $pciids); $GLPI_CACHE->set($vendors->cache_key, $pciids);
......
...@@ -95,7 +95,7 @@ class USBVendor extends CommonDropdown implements CacheableListInterface { ...@@ -95,7 +95,7 @@ class USBVendor extends CommonDropdown implements CacheableListInterface {
} }
$jsonfile = new FilesToJSON(); $jsonfile = new FilesToJSON();
$file_usbids = json_decode(file_get_contents($jsonfile->getJsonFilePath('usb')), true); $file_usbids = json_decode(file_get_contents($jsonfile->getJsonFilePath('usbid')), true);
$db_usbids = $vendors->getDbList(); $db_usbids = $vendors->getDbList();
$usbids = $db_usbids + $file_usbids; $usbids = $db_usbids + $file_usbids;
$GLPI_CACHE->set($vendors->cache_key, $usbids); $GLPI_CACHE->set($vendors->cache_key, $usbids);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment