aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers/PrintersController.php
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application/Controllers/PrintersController.php')
-rw-r--r--h-source/Application/Controllers/PrintersController.php24
1 files changed, 4 insertions, 20 deletions
diff --git a/h-source/Application/Controllers/PrintersController.php b/h-source/Application/Controllers/PrintersController.php
index 06a0f93..d8cfe38 100644
--- a/h-source/Application/Controllers/PrintersController.php
+++ b/h-source/Application/Controllers/PrintersController.php
@@ -52,19 +52,10 @@ class PrintersController extends GenericController
"++checkIsStrings|".Printer::$commYear => "comm_year",
"+++checkIsStrings|".Printer::$interface => "interface",
"++++checkIsStrings|".Printer::$subtype => "subtype",
+ "+++++checkIsStrings|".Printer::$trackSelect => "it_tracks_users",
);
- $this->m['HardwareModel']->strongConditions['insert'] = array(
- "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",
- "++checkIsStrings|".Printer::$commYear => "comm_year",
- "+++checkIsStrings|".Printer::$interface => "interface",
- "++++checkIsStrings|".Printer::$subtype => "subtype",
- );
+ $this->m['HardwareModel']->strongConditions['insert'] = $this->m['HardwareModel']->strongConditions['update'];
$this->m['HardwareModel']->softConditions['update'] = array(
"checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry",
@@ -75,16 +66,9 @@ class PrintersController extends GenericController
"+++checkLength|1000" => "other_names|the <i>other names</i> entry exceeds the value of 1000 characters",
);
- $this->m['HardwareModel']->softConditions['insert'] = array(
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry",
- "checkLength|20000" => "description",
- "+checkLength|49" => "driver",
- "++checkLength|49" => "kernel",
- "++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 / , : ; ( ) [ ]",
- "+++checkLength|1000" => "other_names|the <i>other names</i> entry exceeds the value of 1000 characters",
- );
+ $this->m['HardwareModel']->softConditions['insert'] = $this->m['HardwareModel']->softConditions['update'];
- $this->m['HardwareModel']->setFields('model,kernel,description,compatibility,distribution,comm_year,pci_id,driver,interface,subtype,other_names','sanitizeAll');
+ $this->m['HardwareModel']->setFields('model,kernel,description,compatibility,distribution,comm_year,pci_id,driver,interface,subtype,other_names,it_tracks_users','sanitizeAll');
$argKeys = array(
'page:forceNat' => 1,