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/DownloadController.php | 5 +++++ .../Application/Controllers/PrintersController.php | 24 ++++------------------ h-source/Application/Include/hardware.php | 2 ++ h-source/Application/Include/languages.php | 1 + h-source/Application/Models/PrintersModel.php | 1 + h-source/Application/Views/Printers/catalogue.php | 7 ++++++- h-source/Application/Views/form.php | 7 +++++++ h-source/Application/Views/page.php | 7 +++++++ 8 files changed, 33 insertions(+), 21 deletions(-) (limited to 'h-source/Application') diff --git a/h-source/Application/Controllers/DownloadController.php b/h-source/Application/Controllers/DownloadController.php index 1e4f94e..bc433c4 100644 --- a/h-source/Application/Controllers/DownloadController.php +++ b/h-source/Application/Controllers/DownloadController.php @@ -96,6 +96,11 @@ class DownloadController extends BaseController $xml .= "\t\t".$row['hardware']['compatibility']."\n"; } + if ($type === 'printer') + { + $xml .= "\t\t".$row['hardware']['it_tracks_users']."\n"; + } + if ($type === 'notebook') { $xml .= "\t\t".$row['hardware']['wifi_type']."\n"; 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, diff --git a/h-source/Application/Include/hardware.php b/h-source/Application/Include/hardware.php index 7cfb994..91a66be 100644 --- a/h-source/Application/Include/hardware.php +++ b/h-source/Application/Include/hardware.php @@ -151,6 +151,8 @@ class Hardware public static $commYear = 'not-specified,2011,2010,2009,2008,2007,2006,2005,2004,2003,2002,2001,2000,1999,1998,1997,1996,1995,1994,1993,1992'; + public static $trackSelect = 'not-specified,no,yes'; + } class Printer extends Hardware diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php index 4839e43..11ebf54 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -311,6 +311,7 @@ class Lang /*0263*/"close the issue" => "chiudi la questione", /*0264*/"This issue is closed" => "Questa questione è stata chiusa", /*0265*/"This issue is opened" => "Questa questione è aperta", + /*0266*/"does it adopt any techniques to track users?" => "adotta qualche tecnica per tracciare gli utenti?", ), 'es' => array ( diff --git a/h-source/Application/Models/PrintersModel.php b/h-source/Application/Models/PrintersModel.php index 882224d..74cc0af 100644 --- a/h-source/Application/Models/PrintersModel.php +++ b/h-source/Application/Models/PrintersModel.php @@ -54,6 +54,7 @@ class PrintersModel extends GenericModel 'interface' => gtext("interface"), 'distribution' => gtext('GNU/Linux distribution used for the test'), 'compatibility' => gtext('compatibility with free software'), + 'it_tracks_users' => gtext('does it adopt any techniques to track users?'), 'kernel' => gtext('tested with the following kernel libre'), 'driver' => gtext("free driver used"), 'description' => gtext('Description'), diff --git a/h-source/Application/Views/Printers/catalogue.php b/h-source/Application/Views/Printers/catalogue.php index 06764cb..bb24e35 100644 --- a/h-source/Application/Views/Printers/catalogue.php +++ b/h-source/Application/Views/Printers/catalogue.php @@ -54,7 +54,7 @@
- +
:
@@ -74,6 +74,11 @@
:
+ +
+
+
+
+ controller,'printers') === 0 ) { ?> +
+ + +
+ +
diff --git a/h-source/Application/Views/page.php b/h-source/Application/Views/page.php index dad60f6..727431c 100644 --- a/h-source/Application/Views/page.php +++ b/h-source/Application/Views/page.php @@ -113,6 +113,13 @@
+ + controller,'printers') === 0 ) { ?> +
+
+
+
+
:
-- cgit v1.2.3