From ea0f13c140f6444d4b0da9e38e1c27c9004b6184 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Thu, 2 Aug 2012 00:44:36 +0000 Subject: dropped pcmcia controller, added generic host controller with subtype --- .../Application/Controllers/DownloadController.php | 8 +- .../Controllers/HostcontrollersController.php | 137 +++++++++++++++++++++ .../Application/Controllers/PcmciaController.php | 131 -------------------- .../Application/Controllers/PrintersController.php | 2 + h-source/Application/Include/hardware.php | 54 +++++++- h-source/Application/Include/languages.php | 33 +++-- h-source/Application/Include/myFunctions.php | 3 +- .../Application/Include/vendorTranslations.php | 5 + h-source/Application/Include/version.php | 4 +- h-source/Application/Models/GenericModel.php | 2 +- .../Application/Models/HostcontrollersModel.php | 69 +++++++++++ h-source/Application/Models/PcmciaModel.php | 68 ---------- .../Application/Views/Desktop/Download/index.php | 4 +- .../Application/Views/Desktop/Hardware/left.php | 2 +- .../Views/Desktop/Search/lspci_results.php | 23 +--- h-source/Application/Views/Desktop/catalogue.php | 8 +- h-source/Application/Views/Desktop/form.php | 3 + .../Application/Views/Desktop/if_page_deleted.php | 1 + h-source/Application/Views/Desktop/page.php | 6 +- .../Application/Views/Mobile/Hardware/left.php | 4 +- h-source/Application/Views/Mobile/catalogue.php | 9 +- .../Application/Views/Mobile/if_page_deleted.php | 1 + h-source/Application/Views/Mobile/page.php | 6 +- h-source/Config/Route.php | 20 +-- h-source/tables.sql | 4 +- 25 files changed, 338 insertions(+), 269 deletions(-) create mode 100644 h-source/Application/Controllers/HostcontrollersController.php delete mode 100644 h-source/Application/Controllers/PcmciaController.php create mode 100644 h-source/Application/Models/HostcontrollersModel.php delete mode 100644 h-source/Application/Models/PcmciaModel.php diff --git a/h-source/Application/Controllers/DownloadController.php b/h-source/Application/Controllers/DownloadController.php index 5e15e7e..98f362e 100644 --- a/h-source/Application/Controllers/DownloadController.php +++ b/h-source/Application/Controllers/DownloadController.php @@ -63,7 +63,7 @@ class DownloadController extends BaseController $xml .= "\t\t".$row['hardware']['id_hard']."\n"; $xml .= "\t\t".$row['hardware']['type']."\n"; - if ($type === 'notebook' or $type === 'printer') + if ($type === 'notebook' or $type === 'printer' or $type === 'host-controller' ) { $xml .= "\t\t".$row['hardware']['subtype']."\n"; } @@ -116,7 +116,7 @@ class DownloadController extends BaseController { $xml .= "\t\t".$row['hardware']['video_card_works']."\n"; } - else if ($type === 'acquisition-card' or $type === 'modem' or $type === 'RAID-adapter' or $type === 'PCMCIA-controller') + else if ($type === 'acquisition-card' or $type === 'modem' or $type === 'RAID-adapter' or $type === 'host-controller') { $xml .= "\t\t".$row['hardware']['compatibility']."\n"; } @@ -259,8 +259,8 @@ class DownloadController extends BaseController $this->printXml($lang, array('type'=>'RAID-adapter','-deleted'=>'no')); } - public function pcmcia($lang = 'en') + public function hostcontrollers($lang = 'en') { - $this->printXml($lang, array('type'=>'PCMCIA-controller','-deleted'=>'no')); + $this->printXml($lang, array('type'=>'host-controller','-deleted'=>'no')); } } \ No newline at end of file diff --git a/h-source/Application/Controllers/HostcontrollersController.php b/h-source/Application/Controllers/HostcontrollersController.php new file mode 100644 index 0000000..b1c9404 --- /dev/null +++ b/h-source/Application/Controllers/HostcontrollersController.php @@ -0,0 +1,137 @@ +. + +if (!defined('EG')) die('Direct access not allowed!'); + +class HostcontrollersController extends GenericController +{ + + public function __construct($model, $controller, $queryString) + { + + $worksOptions = Hostcontrollers::$select; + $worksField = 'compatibility'; + $interfaceOptions = Hostcontrollers::$interface; + + parent::__construct($model, $controller, $queryString); + + //load the model + $this->model('HardwareModel'); + $this->model('RevisionsModel'); + $this->model('HostcontrollersModel'); + $this->model('TalkModel'); + + $this->mod = $this->m['HostcontrollersModel']; + + $this->m['HardwareModel']->id_user = $this->s['registered']->status['id_user']; + $this->m['HardwareModel']->type = 'host-controller'; + + $this->m['HardwareModel']->setConditions($worksOptions,$worksField,$interfaceOptions); + + $this->m['HardwareModel']->strongConditions['insert']["+++++checkIsStrings|".Hostcontrollers::subtypeList()] = "subtype"; + + $this->m['HardwareModel']->strongConditions['update'] = $this->m['HardwareModel']->strongConditions['insert']; + + $this->m['HardwareModel']->setFields('model,kernel,description,distribution,comm_year,compatibility,pci_id,interface,driver,subtype,other_names','sanitizeAll'); + + $argKeys = array( + 'page:forceNat' => 1, + 'history_page:forceNat' => 1, + 'vendor:sanitizeString' => 'undef', + 'comm_year:sanitizeString' => 'undef', + 'compatibility:sanitizeString' => 'undef', + 'subtype:sanitizeString' => 'undef', + 'sort-by:sanitizeString' => 'undef', + 'search_string:sanitizeString' => 'undef' + ); + + $this->setArgKeys($argKeys); + + $data['title'] = 'Host controller'; + + $data['intefaceOptions'] = $interfaceOptions; + $data['worksOptions'] = $worksOptions; + $data['worksField'] = $worksField; + + $data['notFoundString'] = "No Host Controller found"; + + $data['subtypeHelpLabel'] = "PCMCIA, USB, Firewire, HECI"; + + $this->append($data); + } + + public function catalogue($lang = 'en') + { + $this->shift(1); + + $whereArray = array( + 'type' => $this->mod->type, + 'vendor' => $this->viewArgs['vendor'], + 'comm_year' => $this->viewArgs['comm_year'], + 'compatibility' => $this->viewArgs['compatibility'], + 'subtype' => $this->viewArgs['subtype'], + ); + + $this->mod->setWhereQueryClause($whereArray); + + parent::catalogue($lang); + } + + public function view($lang = 'en', $id = 0, $name = null) + { + parent::view($lang, $id, $name); + } + + public function history($lang = 'en', $id = 0) + { + parent::history($lang, $id); + } + + public function revision($lang = 'en', $id_rev = 0) + { + parent::revision($lang, $id_rev); + } + + public function insert($lang = 'en', $token = '') + { + parent::insert($lang, $token); + } + + public function update($lang = 'en', $token = '') + { + parent::update($lang, $token); + } + + public function differences($lang = 'en', $id_hard = 0, $id_rev = 0) + { + parent::differences($lang, $id_hard, $id_rev); + } + + public function climb($lang = 'en', $id_rev = 0, $token = '') + { + parent::climb($lang, $id_rev, $token); + } + + public function talk($lang = 'en', $id_hard = 0, $token = '') + { + parent::talk($lang, $id_hard, $token); + } + +} \ No newline at end of file diff --git a/h-source/Application/Controllers/PcmciaController.php b/h-source/Application/Controllers/PcmciaController.php deleted file mode 100644 index 889ca0f..0000000 --- a/h-source/Application/Controllers/PcmciaController.php +++ /dev/null @@ -1,131 +0,0 @@ -. - -if (!defined('EG')) die('Direct access not allowed!'); - -class PcmciaController extends GenericController -{ - - public function __construct($model, $controller, $queryString) - { - - $worksOptions = PCMCIAControllers::$select; - $worksField = 'compatibility'; - $interfaceOptions = PCMCIAControllers::$interface; - - parent::__construct($model, $controller, $queryString); - - //load the model - $this->model('HardwareModel'); - $this->model('RevisionsModel'); - $this->model('PcmciaModel'); - $this->model('TalkModel'); - - $this->mod = $this->m['PcmciaModel']; - - $this->m['HardwareModel']->id_user = $this->s['registered']->status['id_user']; - $this->m['HardwareModel']->type = 'PCMCIA-controller'; - - $this->m['HardwareModel']->setConditions($worksOptions,$worksField,$interfaceOptions); - - $this->m['HardwareModel']->setFields('model,kernel,description,distribution,comm_year,compatibility,pci_id,interface,driver,other_names','sanitizeAll'); - - $argKeys = array( - 'page:forceNat' => 1, - 'history_page:forceNat' => 1, - 'vendor:sanitizeString' => 'undef', - 'comm_year:sanitizeString' => 'undef', - 'compatibility:sanitizeString' => 'undef', - 'interface:sanitizeString' => 'undef', - 'sort-by:sanitizeString' => 'undef', - 'search_string:sanitizeString' => 'undef' - ); - - $this->setArgKeys($argKeys); - - $data['title'] = 'Acquisition cards'; - - $data['intefaceOptions'] = $interfaceOptions; - $data['worksOptions'] = $worksOptions; - $data['worksField'] = $worksField; - - $data['notFoundString'] = "No PCMCIA Controller found"; - - $this->append($data); - } - - public function catalogue($lang = 'en') - { - $this->shift(1); - - $whereArray = array( - 'type' => $this->mod->type, - 'vendor' => $this->viewArgs['vendor'], - 'comm_year' => $this->viewArgs['comm_year'], - 'compatibility' => $this->viewArgs['compatibility'], - 'interface' => $this->viewArgs['interface'], - ); - - $this->mod->setWhereQueryClause($whereArray); - - parent::catalogue($lang); - } - - public function view($lang = 'en', $id = 0, $name = null) - { - parent::view($lang, $id, $name); - } - - public function history($lang = 'en', $id = 0) - { - parent::history($lang, $id); - } - - public function revision($lang = 'en', $id_rev = 0) - { - parent::revision($lang, $id_rev); - } - - public function insert($lang = 'en', $token = '') - { - parent::insert($lang, $token); - } - - public function update($lang = 'en', $token = '') - { - parent::update($lang, $token); - } - - public function differences($lang = 'en', $id_hard = 0, $id_rev = 0) - { - parent::differences($lang, $id_hard, $id_rev); - } - - public function climb($lang = 'en', $id_rev = 0, $token = '') - { - parent::climb($lang, $id_rev, $token); - } - - public function talk($lang = 'en', $id_hard = 0, $token = '') - { - parent::talk($lang, $id_hard, $token); - } - -} \ No newline at end of file diff --git a/h-source/Application/Controllers/PrintersController.php b/h-source/Application/Controllers/PrintersController.php index baedda8..acf1b59 100644 --- a/h-source/Application/Controllers/PrintersController.php +++ b/h-source/Application/Controllers/PrintersController.php @@ -89,6 +89,8 @@ class PrintersController extends GenericController $data['notFoundString'] = "No printers found"; + $data['subtypeHelpLabel'] = "laser, inkjet, .."; + $this->append($data); } diff --git a/h-source/Application/Include/hardware.php b/h-source/Application/Include/hardware.php index eebdbd5..ce2ad01 100644 --- a/h-source/Application/Include/hardware.php +++ b/h-source/Application/Include/hardware.php @@ -41,6 +41,10 @@ class Hardware "works_without_3D" => "works, but without 3D acceleration", "does_not_work" => "it does not work", "can-be-installed" => "can be installed", + "pcmcia-controller" => "PCMCIA Controller", + "usb-controller" => "USB Controller", + "firewire-controller" => "Firewire Controller", + "heci-controller" => "HECI Controller", ); public static $regExpressions = array( @@ -71,6 +75,7 @@ class Hardware '0805' => 'sdcardreaders', '0703' => 'modems', '0104' => 'raidadapters', + '0c00' => 'hostcontrollers', ); public static $icons = array( @@ -89,7 +94,7 @@ class Hardware 'sd-card-reader' => 'H2O/media-flash-sd-mmc_22.png', 'modem' => 'Crystal/modem_22.png', 'RAID-adapter' => 'Crystal/1282042976_hardware.png', - 'PCMCIA-controller' => 'Crystal/1282042976_hardware.png', + 'host-controller' => 'Crystal/1282042976_hardware.png', ); public static $typeToController = array( @@ -108,7 +113,26 @@ class Hardware 'sd-card-reader' => 'sdcardreaders', 'modem' => 'modems', 'RAID-adapter' => 'raidadapters', - 'PCMCIA-controller' => 'pcmcia', + 'host-controller' => 'hostcontrollers', + ); + + public static $typeToWorksField = array( + 'notebook' => 'compatibility', + 'wifi' => 'wifi_works', + 'videocard' => 'video_card_works', + 'printer' => 'compatibility', + 'scanner' => 'compatibility', + '3G-card' => 'wifi_works', + 'soundcard' => 'sound_card_works', + 'webcam' => 'webcam_works', + 'bluetooth' => 'bluetooth_works', + 'acquisition-card' => 'compatibility', + 'fingerprint-reader' => 'fingerprint_works', + 'ethernet-card' => 'ethernet_card_works', + 'sd-card-reader' => 'sd_card_works', + 'modem' => 'compatibility', + 'RAID-adapter' => 'compatibility', + 'host-controller' => 'compatibility', ); public static function getTypes() @@ -125,6 +149,15 @@ class Hardware return null; } + public static function getWorksFieldFromType($type) + { + if (array_key_exists($type,self::$typeToWorksField)) + { + return self::$typeToWorksField[$type]; + } + return null; + } + //get the type from the controller public static function getTypeFromController($controller) { @@ -482,4 +515,21 @@ class Raidadapters extends Acquisitioncards class PCMCIAControllers extends Acquisitioncards { +} + +class Hostcontrollers extends Acquisitioncards +{ + + public static $subtype = array( + "PCMCIA Controller" => "pcmcia-controller", + "USB Controller" => "usb-controller", + "Firewire Controller" => "firewire-controller", + "HECI Controller" => "heci-controller", + ); + + public static function subtypeList() + { + return implode(',',array_values(self::$subtype)); + } + } \ No newline at end of file diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php index 965a814..9fe75d9 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -404,6 +404,15 @@ class Lang /*0343*/"If you don't want to confirm the account registration\nthen wait one hour and your username and e-mail will be deleted from the database" => "Se non vuoi confermare la registrazione dell'account\naspetta un ora e il tuo username e la tua e-mail verranno cancellati dal nostro database", /*0344*/"If you received this e-mail for error, please simply disregard this message" => "Se hai ricevuto questa e-mail per errore, per favore cancellala", /*0345*/"account registration" => "registrazione account", + /*0346*/"Host Controllers" => "Host Controller", + /*0347*/"No Host Controller found" => "Non è stato trovato alcun host controller", + /*0348*/"Download the xml file of all the Host Controllers in the database" => "Scarica il file xml di tutti gli Host Controller presenti nel database", + /*0349*/"PCMCIA Controller" => "Controller PCMCIA", + /*0350*/"USB Controller" => "Controller USB", + /*0351*/"Firewire Controller" => "Controller Firewire", + /*0352*/"HECI Controller" => "Controller HECI", + /*0353*/"device type" => "tipo di dispositivo", + /*0354*/"Thanks for your contribution!" => "Grazie per il tuo contributo!", ), 'es' => array ( @@ -1586,7 +1595,7 @@ class Lang /*13*/'sdcardreaders' => 'sd card reader', /*14*/'modems' => 'modem', /*15*/'raidadapters' => 'RAID adapter', - /*16*/'pcmcia' => 'PCMCIA controller', + /*16*/'hostcontrollers' => 'host controller', ), 'it' => array( 'notebooks' => 'notebook', @@ -1604,7 +1613,7 @@ class Lang 'sdcardreaders' => 'lettore di schede sd', 'modems' => 'modem', 'raidadapters' => 'adattatore RAID', - 'pcmcia' => 'controller PCMCIA', + 'hostcontrollers' => 'host controller', ), 'es' => array( 'notebooks' => 'portátil', @@ -1622,7 +1631,7 @@ class Lang 'sdcardreaders' => 'lector de tarjetas sd', 'modems' => 'modem', 'raidadapters' => 'RAID adapter', - 'pcmcia' => 'PCMCIA controller', + 'hostcontrollers' => 'host controller', ), 'fr' => array( 'notebooks' => 'notebook', @@ -1640,7 +1649,7 @@ class Lang 'sdcardreaders' => 'lecteur de carte SD', 'modem' => 'modem', 'raidadapters' => 'RAID adapter', - 'pcmcia' => 'PCMCIA controller', + 'hostcontrollers' => 'host controller', ), 'de' => array( 'notebooks' => 'notebook', @@ -1658,7 +1667,7 @@ class Lang 'sdcardreaders' => 'sd card reader', 'modems' => 'modem', 'raidadapters' => 'RAID adapter', - 'pcmcia' => 'PCMCIA controller', + 'hostcontrollers' => 'host controller', ), 'gr' => array( /*01*/'notebooks' => 'Υπο-φορητοί υπολογιστές', @@ -1676,7 +1685,7 @@ class Lang /*13*/'sdcardreaders' => 'Συσκευές ανάγνωσης καρτών sd', /*14*/'modems' => 'Συσκευές modem', /*15*/'raidadapters' => 'RAID adapter', - 'pcmcia' => 'PCMCIA controller', + /*16*/'hostcontrollers' => 'host controller', ), ); @@ -1697,7 +1706,7 @@ class Lang /*13*/'sdcardreaders' => 'sd card readers', /*14*/'modems' => 'modems', /*15*/'raidadapters' => 'RAID adapters', - /*16*/'pcmcia' => 'PCMCIA controllers', + /*16*/'hostcontrollers' => 'host controllers', ), 'it' => array( /*01*/'notebooks' => 'notebook', @@ -1715,7 +1724,7 @@ class Lang /*13*/'sdcardreaders' => 'lettori di schede sd', /*14*/'modems' => 'modem', /*15*/'raidadapters' => 'adattatori RAID', - /*16*/'pcmcia' => 'controller PCMCIA', + /*16*/'hostcontrollers' => 'host controller', ), 'es' => array( /*01*/'notebooks' => 'portátiles', @@ -1733,7 +1742,7 @@ class Lang /*13*/'sdcardreaders' => 'lectores de tarjetas sd', /*14*/'modems' => 'modems', /*15*/'raidadapters' => 'RAID adapters', - /*16*/'pcmcia' => 'PCMCIA controllers', + /*16*/'hostcontrollers' => 'host controllers', ), 'fr' => array( /*01*/'notebooks' => 'notebooks', @@ -1751,7 +1760,7 @@ class Lang /*13*/'sdcardreaders' => 'lecteurs de cartes SD', /*14*/'modems' => 'modems', /*15*/'raidadapters' => 'RAID adapters', - /*16*/'pcmcia' => 'PCMCIA controllers', + /*16*/'hostcontrollers' => 'host controllers', ), 'de' => array( /*01*/'notebooks' => 'notebooks', @@ -1769,7 +1778,7 @@ class Lang /*13*/'sdcardreaders' => 'sd card readers', /*14*/'modems' => 'modems', /*15*/'raidadapters' => 'RAID adapters', - /*16*/'pcmcia' => 'PCMCIA controllers', + /*16*/'hostcontrollers' => 'host controllers', ), 'gr' => array( /*01*/'notebooks' => 'Υπο-φορητοί υπολογιστές', @@ -1787,7 +1796,7 @@ class Lang /*13*/'sdcardreaders' => 'Συσκευές ανάγνωσης καρτών sd', /*14*/'modems' => 'Συσκευές modem', /*15*/'raidadapters' => 'RAID adapters', - /*16*/'pcmcia' => 'PCMCIA controllers', + /*16*/'hostcontrollers' => 'host controllers', ), ); diff --git a/h-source/Application/Include/myFunctions.php b/h-source/Application/Include/myFunctions.php index 4f830f4..dc2eb9c 100644 --- a/h-source/Application/Include/myFunctions.php +++ b/h-source/Application/Include/myFunctions.php @@ -448,7 +448,8 @@ function getTranslationFunction($fieldName) { $fieldsFunc = array( "vendor" => "betterVendor", - "interface" => "translate", + "interface" => "translate_and_gtext", + "subtype" => "translate_and_gtext", ); if (array_key_exists($fieldName,$fieldsFunc)) diff --git a/h-source/Application/Include/vendorTranslations.php b/h-source/Application/Include/vendorTranslations.php index 09d1298..6d5eb53 100644 --- a/h-source/Application/Include/vendorTranslations.php +++ b/h-source/Application/Include/vendorTranslations.php @@ -23,6 +23,11 @@ if (!defined('EG')) die('Direct access not allowed!'); //rewrite the vendor name function betterVendor($string) { + if ($string === 'undef') + { + return gtext($string); + } + $vendors = new VendorsModel(); $exceptions = array( diff --git a/h-source/Application/Include/version.php b/h-source/Application/Include/version.php index c4b6ebb..7e348f6 100644 --- a/h-source/Application/Include/version.php +++ b/h-source/Application/Include/version.php @@ -60,8 +60,8 @@ class Version 'notebooks,view', 'raidadapters,catalogue', 'raidadapters,view', - 'pcmcia,catalogue', - 'pcmcia,view', + 'hostcontrollers,catalogue', + 'hostcontrollers,view', ); //get the subfolder of the Views folder where to look for the view files diff --git a/h-source/Application/Models/GenericModel.php b/h-source/Application/Models/GenericModel.php index c4c69ab..3a0f8fa 100644 --- a/h-source/Application/Models/GenericModel.php +++ b/h-source/Application/Models/GenericModel.php @@ -90,7 +90,7 @@ class GenericModel extends Model_Tree { { if (!in_array($field,$listArray)) { - $value = getTranslationFunction($field) !== 'gtext' ? gtext(call_user_func(getTranslationFunction($field),$value)) : gtext($value); + $value = call_user_func(getTranslationFunction($field),$value); $html .= "
".$value."
\n"; $count++; diff --git a/h-source/Application/Models/HostcontrollersModel.php b/h-source/Application/Models/HostcontrollersModel.php new file mode 100644 index 0000000..8908052 --- /dev/null +++ b/h-source/Application/Models/HostcontrollersModel.php @@ -0,0 +1,69 @@ +. + +if (!defined('EG')) die('Direct access not allowed!'); + +class HostcontrollersModel extends GenericModel +{ + + public $type = 'host-controller'; //device type + + public function __construct() + { + + $this->_popupItemNames = array( + 'vendor' => 'vendor', + 'comm_year' => 'comm_year', + 'compatibility' => 'compatibility', + 'subtype' => 'subtype', + ); + + $this->_popupLabels = array( + 'vendor' => gtext("vendor"), + 'comm_year' => gtext("year"), + 'compatibility' => gtext("does it work?"), + 'subtype' => gtext("subtype"), + ); + + $this->setPopupFunctions(); + + $this->createPopupWhere('vendor,compatibility,comm_year,subtype'); + + $this->diffFields = array( + 'vendor' => gtext("vendor"), + 'model' => gtext('model name'), + 'other_names' => gtext('possible other names of the device'), + 'subtype' => gtext('subtype')." (laser, inkjet, ..)", + 'pci_id' => gtext("VendorID:ProductID code of the device"), + 'comm_year' => gtext('year of commercialization'), + 'interface' => gtext("interface"), + 'distribution' => gtext('GNU/Linux distribution used for the test'), + 'kernel' => gtext('tested with the following kernel libre'), + 'compatibility' => gtext("does it work with free software?"), + 'driver' => gtext("free driver used"), + 'description' => gtext('Description'), + ); + + $this->fieldsWithBreaks = array(gtext('Description'),gtext('possible other names of the device')); + + parent::__construct(); + } + +} \ No newline at end of file diff --git a/h-source/Application/Models/PcmciaModel.php b/h-source/Application/Models/PcmciaModel.php deleted file mode 100644 index 538aa7a..0000000 --- a/h-source/Application/Models/PcmciaModel.php +++ /dev/null @@ -1,68 +0,0 @@ -. - -if (!defined('EG')) die('Direct access not allowed!'); - -class PcmciaModel extends GenericModel -{ - - public $type = 'PCMCIA-controller'; //device type - - public function __construct() - { - - $this->_popupItemNames = array( - 'vendor' => 'vendor', - 'comm_year' => 'comm_year', - 'compatibility' => 'compatibility', - 'interface' => 'interface', - ); - - $this->_popupLabels = array( - 'vendor' => gtext("vendor"), - 'comm_year' => gtext("year"), - 'compatibility' => gtext("does it work?"), - 'interface' => gtext("interface"), - ); - - $this->setPopupFunctions(); - - $this->createPopupWhere('vendor,compatibility,comm_year,interface'); - - $this->diffFields = array( - 'vendor' => gtext("vendor"), - 'model' => gtext('model name'), - 'other_names' => gtext('possible other names of the device'), - 'pci_id' => gtext("VendorID:ProductID code of the device"), - 'comm_year' => gtext('year of commercialization'), - 'interface' => gtext("interface"), - 'distribution' => gtext('GNU/Linux distribution used for the test'), - 'kernel' => gtext('tested with the following kernel libre'), - 'compatibility' => gtext("does it work with free software?"), - 'driver' => gtext("free driver used"), - 'description' => gtext('Description'), - ); - - $this->fieldsWithBreaks = array(gtext('Description'),gtext('possible other names of the device')); - - parent::__construct(); - } - -} \ No newline at end of file diff --git a/h-source/Application/Views/Desktop/Download/index.php b/h-source/Application/Views/Desktop/Download/index.php index 31aa3b0..2f37f81 100644 --- a/h-source/Application/Views/Desktop/Download/index.php +++ b/h-source/Application/Views/Desktop/Download/index.php @@ -102,8 +102,8 @@ "> - PCMCIA Controllers in the database");?> - "> + Host Controllers in the database");?> + "> diff --git a/h-source/Application/Views/Desktop/Hardware/left.php b/h-source/Application/Views/Desktop/Hardware/left.php index ffbb50e..738be2f 100644 --- a/h-source/Application/Views/Desktop/Hardware/left.php +++ b/h-source/Application/Views/Desktop/Hardware/left.php @@ -87,6 +87,6 @@
- +
\ No newline at end of file diff --git a/h-source/Application/Views/Desktop/Search/lspci_results.php b/h-source/Application/Views/Desktop/Search/lspci_results.php index b74867b..970789b 100644 --- a/h-source/Application/Views/Desktop/Search/lspci_results.php +++ b/h-source/Application/Views/Desktop/Search/lspci_results.php @@ -53,27 +53,7 @@
".gtext($row['hardware']['wifi_works']).""; - break; - case 'videocard': - echo gtext("does it work with free software?"). " ".gtext(Videocard::$videoReverse[$row['hardware']['video_card_works']]).""; - break; - case 'soundcard': - echo gtext("does it work with free software?"). " ".gtext($row['hardware']['sound_card_works']).""; - break; - case 'ethernet-card': - echo gtext("does it work with free software?"). " ".gtext($row['hardware']['ethernet_card_works']).""; - break; - case 'acquisition-card': - echo gtext("does it work with free software?"). " ".gtext($row['hardware']['compatibility']).""; - break; - case 'sd-card-reader': - echo gtext("does it work with free software?"). " ".gtext($row['hardware']['sd_card_works']).""; - break; - } + echo gtext("does it work with free software?"). " ".gtext($row['hardware'][Hardware::getWorksFieldFromType($row['hardware']['type'])]).""; ?>
@@ -94,6 +74,7 @@ ".Hardware::getTypeFromClass($device['classId'])." - ".$device['deviceName'];?>
diff --git a/h-source/Application/Views/Desktop/catalogue.php b/h-source/Application/Views/Desktop/catalogue.php index 4ab18f0..b89eed6 100644 --- a/h-source/Application/Views/Desktop/catalogue.php +++ b/h-source/Application/Views/Desktop/catalogue.php @@ -71,10 +71,14 @@
- controller,'notebooks') === 0 ) { ?> + controller,'notebooks') === 0 or strcmp($this->controller,'hostcontrollers') === 0) { ?>
+ controller,'notebooks') === 0) { ?>
(, , , ):
-
+ +
():
+ +
diff --git a/h-source/Application/Views/Desktop/form.php b/h-source/Application/Views/Desktop/form.php index 8213756..dd66614 100644 --- a/h-source/Application/Views/Desktop/form.php +++ b/h-source/Application/Views/Desktop/form.php @@ -54,6 +54,9 @@
(laser, inkjet, ..):
+ controller,'hostcontrollers') === 0 ) { ?> +
():
+
diff --git a/h-source/Application/Views/Desktop/if_page_deleted.php b/h-source/Application/Views/Desktop/if_page_deleted.php index 3610716..932d0dd 100644 --- a/h-source/Application/Views/Desktop/if_page_deleted.php +++ b/h-source/Application/Views/Desktop/if_page_deleted.php @@ -52,6 +52,7 @@
+
diff --git a/h-source/Application/Views/Desktop/page.php b/h-source/Application/Views/Desktop/page.php index 8e90923..231975c 100644 --- a/h-source/Application/Views/Desktop/page.php +++ b/h-source/Application/Views/Desktop/page.php @@ -60,10 +60,10 @@
- controller,'printers') === 0 ) { ?> + controller,'printers') === 0 or strcmp($this->controller,'hostcontrollers') === 0) { ?>
-
(laser, inkjet, ..):
-
+
():
+
diff --git a/h-source/Application/Views/Mobile/Hardware/left.php b/h-source/Application/Views/Mobile/Hardware/left.php index 4fbb0e4..d93f72d 100644 --- a/h-source/Application/Views/Mobile/Hardware/left.php +++ b/h-source/Application/Views/Mobile/Hardware/left.php @@ -118,8 +118,8 @@
  • - - + +
  • diff --git a/h-source/Application/Views/Mobile/catalogue.php b/h-source/Application/Views/Mobile/catalogue.php index 6091c05..199d661 100644 --- a/h-source/Application/Views/Mobile/catalogue.php +++ b/h-source/Application/Views/Mobile/catalogue.php @@ -54,9 +54,14 @@

    :

    - controller,'notebooks') === 0 ) { ?> + controller,'notebooks') === 0 or strcmp($this->controller,'hostcontrollers') === 0) { ?>

    - (, , , ): + controller,'notebooks') === 0) { ?> + (, , , ) + + () + + :

    diff --git a/h-source/Application/Views/Mobile/if_page_deleted.php b/h-source/Application/Views/Mobile/if_page_deleted.php index 3610716..932d0dd 100644 --- a/h-source/Application/Views/Mobile/if_page_deleted.php +++ b/h-source/Application/Views/Mobile/if_page_deleted.php @@ -52,6 +52,7 @@
    +
    diff --git a/h-source/Application/Views/Mobile/page.php b/h-source/Application/Views/Mobile/page.php index c692477..9d994b4 100644 --- a/h-source/Application/Views/Mobile/page.php +++ b/h-source/Application/Views/Mobile/page.php @@ -59,10 +59,10 @@
    controller);?>
    - controller,'printers') === 0 ) { ?> + controller,'printers') === 0 or strcmp($this->controller,'hostcontrollers') === 0) { ?>
    -
    (laser, inkjet, ..):
    -
    +
    ():
    +
    diff --git a/h-source/Config/Route.php b/h-source/Config/Route.php index 5a2119d..c26c36b 100644 --- a/h-source/Config/Route.php +++ b/h-source/Config/Route.php @@ -126,7 +126,7 @@ class Route 'download,sdcardreaders', 'download,modems', 'download,raidadapters', - 'download,pcmcia', + 'download,hostcontrollers', 'history,hide', 'history,show', 'history,block', @@ -257,15 +257,15 @@ class Route 'raidadapters,differences', 'raidadapters,climb', 'raidadapters,talk', - 'pcmcia,catalogue', - 'pcmcia,view', - 'pcmcia,history', - 'pcmcia,revision', - 'pcmcia,insert', - 'pcmcia,update', - 'pcmcia,differences', - 'pcmcia,climb', - 'pcmcia,talk', + 'hostcontrollers,catalogue', + 'hostcontrollers,view', + 'hostcontrollers,history', + 'hostcontrollers,revision', + 'hostcontrollers,insert', + 'hostcontrollers,update', + 'hostcontrollers,differences', + 'hostcontrollers,climb', + 'hostcontrollers,talk', ); //it can be 'yes' or 'no' diff --git a/h-source/tables.sql b/h-source/tables.sql index c757655..31d7643 100644 --- a/h-source/tables.sql +++ b/h-source/tables.sql @@ -152,7 +152,7 @@ CREATE TABLE IF NOT EXISTS `hardware` ( `ask_for_del` char(4) NOT NULL DEFAULT 'no', `deleted` char(4) NOT NULL DEFAULT 'no', `pci_id` char(10) NOT NULL, - `subtype` char(15) NOT NULL, + `subtype` char(25) NOT NULL, `driver` varchar(50) NOT NULL, `interface` char(15) NOT NULL DEFAULT 'not-specified', `bios` char(20) NOT NULL DEFAULT 'not-specified', @@ -401,7 +401,7 @@ CREATE TABLE IF NOT EXISTS `revisions` ( `comm_year` char(15) NOT NULL, `id_hard` int(10) unsigned NOT NULL, `pci_id` char(10) NOT NULL, - `subtype` char(15) NOT NULL, + `subtype` char(25)) NOT NULL, `driver` varchar(50) NOT NULL, `interface` char(15) NOT NULL DEFAULT 'not-specified', `bios` char(20) NOT NULL DEFAULT 'not-specified', -- cgit v1.2.3