From be1d2d6c4c5623c6af59cf72e74e0335d1aa6cb5 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Sun, 10 Jul 2011 22:46:30 +0000 Subject: improved the way the history messages are shown --- h-source/Application/Controllers/GenericController.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'h-source/Application/Controllers/GenericController.php') diff --git a/h-source/Application/Controllers/GenericController.php b/h-source/Application/Controllers/GenericController.php index 1539f9f..a5dd24c 100644 --- a/h-source/Application/Controllers/GenericController.php +++ b/h-source/Application/Controllers/GenericController.php @@ -87,13 +87,13 @@ class GenericController extends BaseController { $pci_id = $this->request->post('pci_id','','sanitizeAll'); $interface = $this->request->post('interface','not-defined','sanitizeAll'); - + if ($this->checkVendorId($interface)) { if (strcmp($this->m['HardwareModel']->type,'notebook') !== 0) { $this->m['HardwareModel']->values['vendor'] = sanitizeAll(Vendors::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'; } @@ -104,15 +104,17 @@ class GenericController extends BaseController { if (strcmp($this->controller,'notebooks') === 0) { - session_start(); + @session_start(); $_SESSION['notebook_inserted'] = 'yes'; } - } - if ($this->m['HardwareModel']->queryResult) - { $data['submission_response'] = 'executed'; } + +// if ($this->m['HardwareModel']->queryResult) +// { +// $data['submission_response'] = 'executed'; +// } $this->viewRedirect($this->m['HardwareModel']->lastId); } -- cgit v1.2.3