From 7097598d5576ba5e9391b43f26bfc037c08d61c3 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Thu, 24 May 2012 09:23:37 +0000 Subject: all the names of the vendors are now stored inside the db and are taken from the db --- h-source/Application/Controllers/GenericController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'h-source/Application/Controllers') diff --git a/h-source/Application/Controllers/GenericController.php b/h-source/Application/Controllers/GenericController.php index 059162a..0c140b3 100644 --- a/h-source/Application/Controllers/GenericController.php +++ b/h-source/Application/Controllers/GenericController.php @@ -33,7 +33,7 @@ class GenericController extends BaseController parent::__construct($model, $controller, $queryString); - $this->model('UsersModel'); + $this->model('VendorsModel'); $popup = new Popup(); $popup->name = gtext('sort by'); @@ -111,7 +111,7 @@ class GenericController extends BaseController { if (strcmp($this->m['HardwareModel']->type,'notebook') !== 0) { - $this->m['HardwareModel']->values['vendor'] = sanitizeAll(Vendors::getName($pci_id,$interface)); + $this->m['HardwareModel']->values['vendor'] = sanitizeAll($this->m['VendorsModel']->getName($pci_id,$interface)); $this->m['HardwareModel']->databaseConditions['insert']['+checkUnique'] = 'pci_id|VendorID:ProductID is already present in the database. This means that the device you are trying to insert is already in the database. See here: '.$this->getAlreadyExixtsLink($pci_id); } @@ -275,7 +275,7 @@ class GenericController extends BaseController { if (strcmp($this->m['HardwareModel']->type,'notebook') !== 0) { - $this->m['HardwareModel']->values['vendor'] = sanitizeAll(Vendors::getName($pci_id,$interface)); + $this->m['HardwareModel']->values['vendor'] = sanitizeAll($this->m['VendorsModel']->getName($pci_id,$interface)); $this->m['HardwareModel']->databaseConditions['update']['+checkUniqueCompl'] = 'pci_id|VendorID:ProductID is already present in the database. This means that the device you are trying to insert is already in the database. See here: '.$this->getAlreadyExixtsLink($pci_id); } @@ -356,7 +356,7 @@ class GenericController extends BaseController { if (preg_match('/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/',$_POST['pci_id'])) { - if (Vendors::check($_POST['pci_id'],$interface)) + if ($this->m['VendorsModel']->check($_POST['pci_id'],$interface)) { return true; } -- cgit v1.2.3