From 53f9d690ee2f49545d63788be6c1fe80d9ec6e58 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Thu, 6 Oct 2011 20:25:55 +0000 Subject: added the entry "does it adopt any techniques to track users?" for printers - part 1 --- .../Application/Controllers/PrintersController.php | 24 ++++------------------ 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'h-source/Application/Controllers/PrintersController.php') 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 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", - "++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 kernel entry", @@ -75,16 +66,9 @@ class PrintersController extends GenericController "+++checkLength|1000" => "other_names|the other names 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 kernel 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 driver entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]", - "+++checkLength|1000" => "other_names|the other names 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, -- cgit v1.2.3