Commit 91d005a2 authored by Johan Cwiklinski's avatar Johan Cwiklinski
Browse files

Method name has changed

parent de577178
......@@ -580,7 +580,7 @@ class NetworkPort extends InventoryAsset
if (isset($exploded[2])) {
if (!$GLPI_CACHE->has('glpi_inventory_ouis')) {
$jsonfile = new FilesToJSON();
$ouis = json_decode(file_get_contents($jsonfile->getPathFor('oui')), true);
$ouis = json_decode(file_get_contents($jsonfile->getJsonFilePath('oui')), true);
$GLPI_CACHE->set('glpi_inventory_ouis', $ouis);
}
$ouis = $ouis ?? $GLPI_CACHE->get('glpi_inventory_ouis');
......
......@@ -99,7 +99,7 @@ class NetworkPortType extends CommonDropdown {
public static function getDefaults(): array {
$jsonfile = new FilesToJSON();
$iftypes = json_decode(file_get_contents($jsonfile->getPathFor('iftype')), true);
$iftypes = json_decode(file_get_contents($jsonfile->getJsonFilePath('iftype')), true);
$default_instanciations = [
'Ethernet' => [6, 7, 62, 117, 169],
......
......@@ -95,7 +95,7 @@ class PCIVendor extends CommonDropdown implements CacheableListInterface {
}
$jsonfile = new FilesToJSON();
$file_pciids = json_decode(file_get_contents($jsonfile->getPathFor('pci')), true);
$file_pciids = json_decode(file_get_contents($jsonfile->getJsonFilePath('pci')), true);
$db_pciids = $vendors->getDbList();
$pciids = $db_pciids + $file_pciids;
$GLPI_CACHE->set($vendors->cache_key, $pciids);
......
......@@ -95,7 +95,7 @@ class USBVendor extends CommonDropdown implements CacheableListInterface {
}
$jsonfile = new FilesToJSON();
$file_usbids = json_decode(file_get_contents($jsonfile->getPathFor('usb')), true);
$file_usbids = json_decode(file_get_contents($jsonfile->getJsonFilePath('usb')), true);
$db_usbids = $vendors->getDbList();
$usbids = $db_usbids + $file_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