aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers/PrintersController.php
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-03-02 23:48:56 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-03-02 23:48:56 +0000
commitfdd5ccda63a6c6825035f99c3e6b6df93814cebe (patch)
tree5ba045ff3cb29d94f8216706130471e8fa6c71a7 /h-source/Application/Controllers/PrintersController.php
parent632f611689562bb79dfb18065b6d0851a5c2077e (diff)
vendor is now automatically obtained from vendorid, except for notebooks
Diffstat (limited to 'h-source/Application/Controllers/PrintersController.php')
-rw-r--r--h-source/Application/Controllers/PrintersController.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/h-source/Application/Controllers/PrintersController.php b/h-source/Application/Controllers/PrintersController.php
index 5ea6bf7..0251808 100644
--- a/h-source/Application/Controllers/PrintersController.php
+++ b/h-source/Application/Controllers/PrintersController.php
@@ -43,9 +43,9 @@ class PrintersController extends GenericController
//hardware conditions
$this->m['HardwareModel']->strongConditions['update'] = array(
- "checkIsStrings|".Printer::vendorsList() => "vendor",
"checkNotEmpty" => "model|you have to fill the <i>model name</i> entry",
"checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> 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",
@@ -55,9 +55,9 @@ class PrintersController extends GenericController
);
$this->m['HardwareModel']->strongConditions['insert'] = array(
- "checkIsStrings|".Printer::vendorsList() => "vendor",
"checkNotEmpty" => "model|you have to fill the <i>model name</i> entry",
"checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> 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",
@@ -71,7 +71,6 @@ class PrintersController extends GenericController
"checkLength|20000" => "description",
"+checkLength|49" => "driver",
"++checkLength|49" => "kernel",
- "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> 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 <i>driver</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]",
);
@@ -80,11 +79,10 @@ class PrintersController extends GenericController
"checkLength|20000" => "description",
"+checkLength|49" => "driver",
"++checkLength|49" => "kernel",
- "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> 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 <i>driver</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]",
);
- $this->m['HardwareModel']->setFields('vendor,model,kernel,description,compatibility,distribution,comm_year,pci_id,driver,interface,subtype','sanitizeAll');
+ $this->m['HardwareModel']->setFields('model,kernel,description,compatibility,distribution,comm_year,pci_id,driver,interface,subtype','sanitizeAll');
$argKeys = array(
'page:forceNat' => 1,