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 +++++++ h-source/Public/Css/main.css | 6 +++--- h-source/tables.sql | 2 ++ 10 files changed, 38 insertions(+), 24 deletions(-) (limited to 'h-source') 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 ) { ?> +
+
+
+
+
:
diff --git a/h-source/Public/Css/main.css b/h-source/Public/Css/main.css index dacb52b..b911536 100644 --- a/h-source/Public/Css/main.css +++ b/h-source/Public/Css/main.css @@ -345,12 +345,12 @@ a.link_menu .inner_label { float:left; - width:300px; + width:320px; } .inner_value { float:left; - width:300px; + width:280px; color:#1f538e; font-weight:bold; } @@ -388,7 +388,7 @@ a.link_menu font:bold 12px/1.5 sans-serif,arial; padding:10px; margin:5px 0px 15px 0px; - background:TOMATO; +/* background:TOMATO; */ border-top:2px solid MAROON; border-bottom:2px solid MAROON; color:MAROON; diff --git a/h-source/tables.sql b/h-source/tables.sql index 9b9e8ab..65da6bc 100644 --- a/h-source/tables.sql +++ b/h-source/tables.sql @@ -102,6 +102,7 @@ create table hardware ( fingerprint_works varchar(30) CHARACTER SET utf8 not null default 'not-specified', ethernet-card_works varchar(30) CHARACTER SET utf8 not null default 'not-specified', sd_card_works varchar(30) CHARACTER SET utf8 not null default 'not-specified', + it_tracks_users varchar(30) CHARACTER SET utf8 not null default 'not-specified', can_free_systems_be_installed varchar(30) CHARACTER SET utf8 not null default 'not-specified', architecture char(15) not null default 'not-specified', other_names text CHARACTER SET utf8 not null @@ -137,6 +138,7 @@ create table revisions ( fingerprint_works varchar(30) CHARACTER SET utf8 not null default 'not-specified', ethernet-card_works varchar(30) CHARACTER SET utf8 not null default 'not-specified', sd_card_works varchar(30) CHARACTER SET utf8 not null default 'not-specified', + it_tracks_users varchar(30) CHARACTER SET utf8 not null default 'not-specified', architecture char(15) not null default 'not-specified', other_names text CHARACTER SET utf8 not null, approved char(4) not null default 'yes', -- cgit v1.2.3