aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2012-05-24 09:23:37 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2012-05-24 09:23:37 +0000
commit7097598d5576ba5e9391b43f26bfc037c08d61c3 (patch)
treebbf29889dec96383b580b9a24faf5043a3ab5058 /h-source/Application/Controllers
parent7fb84c6c0e482ae6d2f241b7fb6d75549fa7529d (diff)
all the names of the vendors are now stored inside the db and are taken from the db
Diffstat (limited to 'h-source/Application/Controllers')
-rw-r--r--h-source/Application/Controllers/GenericController.php8
1 files changed, 4 insertions, 4 deletions
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|<i>VendorID:ProductID</i> 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|<i>VendorID:ProductID</i> 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;
}