From a60b8d9cc5078a894e007e5252313185e9810c2e Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Sun, 8 May 2011 15:52:39 +0000 Subject: h-source:added architecture entry for notebooks --- h-source/Application/Controllers/DownloadController.php | 3 ++- h-source/Application/Controllers/NotebooksController.php | 4 +++- h-source/Application/Include/hardware.php | 2 ++ h-source/Application/Include/languages.php | 1 + h-source/Application/Models/NotebooksModel.php | 1 + h-source/Application/Views/Help/index.php | 12 ++++++++++-- h-source/Application/Views/Help/index_es.php | 8 ++++++++ h-source/Application/Views/Help/index_fr.php | 8 ++++++++ h-source/Application/Views/Help/index_it.php | 7 +++++++ h-source/Application/Views/Notebooks/form.php | 5 +++++ h-source/Application/Views/Notebooks/page.php | 5 +++++ h-source/tables.sql | 4 +++- 12 files changed, 55 insertions(+), 5 deletions(-) diff --git a/h-source/Application/Controllers/DownloadController.php b/h-source/Application/Controllers/DownloadController.php index d55f5ad..64eec34 100644 --- a/h-source/Application/Controllers/DownloadController.php +++ b/h-source/Application/Controllers/DownloadController.php @@ -69,6 +69,7 @@ class DownloadController extends BaseController } if ($type === 'notebook') { + $xml .= "\t\t".$row['hardware']['architecture']."\n"; $xml .= "\t\t".$row['hardware']['bios']."\n"; } @@ -138,7 +139,7 @@ class DownloadController extends BaseController $xml .= "\t\t".$row['hardware']['fingerprint_works']."\n"; } - $devicesWithDriverEntry = array('printer','scanner','soundcard','webcam','bluetooth','wifi','videocard','acquisition-card','fingerprint-reader'); + $devicesWithDriverEntry = array('printer','scanner','soundcard','webcam','bluetooth','wifi','videocard','acquisition-card','fingerprint-reader','3G-card'); if (in_array($type,$devicesWithDriverEntry)) { $xml .= "\t\t".$row['hardware']['driver']."\n"; diff --git a/h-source/Application/Controllers/NotebooksController.php b/h-source/Application/Controllers/NotebooksController.php index 03fe4f4..b533a4e 100644 --- a/h-source/Application/Controllers/NotebooksController.php +++ b/h-source/Application/Controllers/NotebooksController.php @@ -55,6 +55,7 @@ class NotebooksController extends GenericController "+++++checkIsStrings|".Notebooks::videoList() => "video_card_works", "++++++checkIsStrings|".Notebooks::$biosSelect => "bios", "+++++++checkIsStrings|".Notebooks::webcamList() => "webcam_works", + "++++++++checkIsStrings|".Notebooks::$architectureSelect => "architecture", ); $this->m['HardwareModel']->strongConditions['insert'] = array( @@ -70,6 +71,7 @@ class NotebooksController extends GenericController "+++++checkIsStrings|".Notebooks::videoList() => "video_card_works", "++++++checkIsStrings|".Notebooks::$biosSelect => "bios", "+++++++checkIsStrings|".Notebooks::webcamList() => "webcam_works", + "++++++++checkIsStrings|".Notebooks::$architectureSelect => "architecture", ); $this->m['HardwareModel']->softConditions['update'] = array( @@ -92,7 +94,7 @@ class NotebooksController extends GenericController "+++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "webcam_type|only the following characters are allowed for the webcam entry: a-z A-Z 0-9 - _ . + / , : ; ( ) [ ]", ); - $this->m['HardwareModel']->setFields('vendor,model,compatibility,kernel,description,distribution,video_card_type,video_card_works,wifi_type,wifi_works,comm_year,subtype,bios,webcam_type,webcam_works','sanitizeAll'); + $this->m['HardwareModel']->setFields('vendor,model,compatibility,kernel,description,distribution,video_card_type,video_card_works,wifi_type,wifi_works,comm_year,subtype,bios,webcam_type,webcam_works,architecture','sanitizeAll'); $argKeys = array( 'page:forceNat' => 1, diff --git a/h-source/Application/Include/hardware.php b/h-source/Application/Include/hardware.php index 17ea425..06b6cc5 100644 --- a/h-source/Application/Include/hardware.php +++ b/h-source/Application/Include/hardware.php @@ -241,6 +241,8 @@ class Notebooks extends Hardware ); public static $subtypeSelect = 'notebook,netbook,not-specified'; + + public static $architectureSelect = 'not-specified,i386,amd64,MIPS,ARM'; public static $biosSelect = 'not-specified,no,yes'; diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php index 2e054c5..9ab5de9 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -220,6 +220,7 @@ class Lang "No fingerprint readers found" => "Non è stato trovato alcun lettore di impronte digitali", "Download the xml file of all the acquisition cards in the database" => "Scarica il file xml di tutte le schede di acquisizione presenti nel database", "Download the xml file of all the fingerprint readers in the database" => "Scarica il file xml di tutti i lettori di impronte digitali presenti nel database", + "architecture" => "architettura", ), 'es' => array ( diff --git a/h-source/Application/Models/NotebooksModel.php b/h-source/Application/Models/NotebooksModel.php index c8d5993..00ab64d 100644 --- a/h-source/Application/Models/NotebooksModel.php +++ b/h-source/Application/Models/NotebooksModel.php @@ -52,6 +52,7 @@ class NotebooksModel extends GenericModel { 'vendor' => gtext("vendor"), 'model' => gtext('model name'), 'subtype' => gtext('subtype (notebook or netbook)'), + 'architecture' => gtext('architecture'), 'bios' => gtext('does it have a free bios?'), 'comm_year' => gtext('year of commercialization'), 'distribution' => gtext('GNU/Linux distribution used for the test'), diff --git a/h-source/Application/Views/Help/index.php b/h-source/Application/Views/Help/index.php index ad9f31b..aff2583 100644 --- a/h-source/Application/Views/Help/index.php +++ b/h-source/Application/Views/Help/index.php @@ -388,9 +388,17 @@ dpkg-query -W -f '${Version}\n' cups - +

How to discover the architecture of your notebook

+ +

Open a terminal and type the following command:

+ +
+		dpkg --print-architecture
+	
+ +

List of fully free GNU/Linux distributions

- +

They are listed in alphabetical order