diff options
author | Antonio Gallo <tonicucoz@gmail.com> | 2011-10-06 20:25:55 +0000 |
---|---|---|
committer | Antonio Gallo <tonicucoz@gmail.com> | 2011-10-06 20:25:55 +0000 |
commit | 53f9d690ee2f49545d63788be6c1fe80d9ec6e58 (patch) | |
tree | b9b51d06c214396d6ca4b79c380d26ce13f53a92 /h-source | |
parent | 99a6ba9947839d62a3f09f48a0ba962c23794491 (diff) |
added the entry "does it adopt any techniques to track users?" for printers - part 1
Diffstat (limited to 'h-source')
-rw-r--r-- | h-source/Application/Controllers/DownloadController.php | 5 | ||||
-rw-r--r-- | h-source/Application/Controllers/PrintersController.php | 24 | ||||
-rw-r--r-- | h-source/Application/Include/hardware.php | 2 | ||||
-rw-r--r-- | h-source/Application/Include/languages.php | 1 | ||||
-rw-r--r-- | h-source/Application/Models/PrintersModel.php | 1 | ||||
-rw-r--r-- | h-source/Application/Views/Printers/catalogue.php | 7 | ||||
-rw-r--r-- | h-source/Application/Views/form.php | 7 | ||||
-rw-r--r-- | h-source/Application/Views/page.php | 7 | ||||
-rw-r--r-- | h-source/Public/Css/main.css | 6 | ||||
-rw-r--r-- | h-source/tables.sql | 2 |
10 files changed, 38 insertions, 24 deletions
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<compatibility>".$row['hardware']['compatibility']."</compatibility>\n"; } + if ($type === 'printer') + { + $xml .= "\t\t<it_tracks_users>".$row['hardware']['it_tracks_users']."</it_tracks_users>\n"; + } + if ($type === 'notebook') { $xml .= "\t\t<wifi_card>".$row['hardware']['wifi_type']."</wifi_card>\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 <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, 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 @@ <div class="inner_value"><?php echo nl2br($item['hardware']['other_names']);?></div> </div> <?php } ?> - + <div class="notebook_vendor"> <div class="inner_label"><?php echo gtext("vendor");?>:</div> <div class="inner_value"><?php echo betterVendor($item['hardware']['vendor']);?></div> @@ -74,6 +74,11 @@ <div class="inner_label"><?php echo gtext("compatibility with free software");?>:</div> <div class="inner_value"><?php echo $item['hardware']['compatibility'];?></div> </div> + + <div class="notebook_kernel"> + <div class="inner_label"><?php echo gtext("does it adopt any techniques to track users?");?></div> + <div class="inner_value"><b><?php echo $item['hardware']['it_tracks_users'];?></b></div> + </div> <div class="notebook_view_link"> <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/".$item['hardware']['id_hard'].'/'.encodeUrl($item['hardware']['model']).$this->viewStatus;?>"><?php echo gtext("view the other specifications");?>..</a> diff --git a/h-source/Application/Views/form.php b/h-source/Application/Views/form.php index f7d61eb..5568cfd 100644 --- a/h-source/Application/Views/form.php +++ b/h-source/Application/Views/form.php @@ -113,6 +113,13 @@ <?php } ?> </div> + <?php if (strcmp($this->controller,'printers') === 0 ) { ?> + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("does it adopt any techniques to track users?");?></div> + <?php echo Html_Form::select('it_tracks_users',$values['it_tracks_users'],Hardware::$trackSelect,"select_entry");?> + </div> + <?php } ?> + <div class="form_entry"> <div class="entry_label hidden_x_explorer"><?php echo gtext("free driver used");?> (<?php echo gtext("see the help page or leave blank if you are not sure");?>):</div> <?php echo Html_Form::input('driver',$values['driver'],'input_entry');?> 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 @@ <?php } ?> </div> + + <?php if (strcmp($this->controller,'printers') === 0 ) { ?> + <div class="notebook_kernel"> + <div class="inner_label"><?php echo gtext("does it adopt any techniques to track users?");?></div> + <div class="inner_value"><b><?php echo $item[$tableName]['it_tracks_users'];?></b></div> + </div> + <?php } ?> <div class="notebook_kernel"> <div class="inner_label"><?php echo gtext("free driver used");?>:</div> 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', |