From fdd5ccda63a6c6825035f99c3e6b6df93814cebe Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Wed, 2 Mar 2011 23:48:56 +0000 Subject: vendor is now automatically obtained from vendorid, except for notebooks --- h-source/Application/Controllers/ScannersController.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'h-source/Application/Controllers/ScannersController.php') diff --git a/h-source/Application/Controllers/ScannersController.php b/h-source/Application/Controllers/ScannersController.php index b6c84e3..1030fb8 100644 --- a/h-source/Application/Controllers/ScannersController.php +++ b/h-source/Application/Controllers/ScannersController.php @@ -43,9 +43,9 @@ class ScannersController extends GenericController //hardware conditions $this->m['HardwareModel']->strongConditions['update'] = array( - "checkIsStrings|".Printer::vendorsList() => "vendor", "checkNotEmpty" => "model|you have to fill the model name entry", "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the model name entry", + "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|VendorID:ProductID has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}", "checkLength|99" => "model", "+checkLength|299" => "distribution", "+checkIsStrings|".Printer::compatibilityList() => "compatibility", @@ -54,9 +54,9 @@ class ScannersController extends GenericController ); $this->m['HardwareModel']->strongConditions['insert'] = array( - "checkIsStrings|".Printer::vendorsList() => "vendor", "checkNotEmpty" => "model|you have to fill the model name entry", "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the model name entry", + "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|VendorID:ProductID has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}", "checkLength|99" => "model", "+checkLength|299" => "distribution", "+checkIsStrings|".Printer::compatibilityList() => "compatibility", @@ -69,7 +69,6 @@ class ScannersController extends GenericController "checkLength|20000" => "description", "+checkLength|49" => "driver", "++checkLength|49" => "kernel", - "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|VendorID:ProductID has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}", "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "driver|only the following characters are allowed for the driver entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]", ); @@ -78,11 +77,10 @@ class ScannersController extends GenericController "checkLength|20000" => "description", "+checkLength|49" => "driver", "++checkLength|49" => "kernel", - "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|VendorID:ProductID has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}", "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "driver|only the following characters are allowed for the driver entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]", ); - $this->m['HardwareModel']->setFields('vendor,model,kernel,description,compatibility,distribution,comm_year,pci_id,driver,interface','sanitizeAll'); + $this->m['HardwareModel']->setFields('model,kernel,description,compatibility,distribution,comm_year,pci_id,driver,interface','sanitizeAll'); $argKeys = array( 'page:forceNat' => 1, -- cgit v1.2.3