aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2012-08-02 00:44:36 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2012-08-02 00:44:36 +0000
commitea0f13c140f6444d4b0da9e38e1c27c9004b6184 (patch)
treec95d58a3a74f5c287040042f030dba6dd34c4012
parent4ee5f0d9dd40b3baa2e27889a579dc7852cbfd6c (diff)
dropped pcmcia controller, added generic host controller with subtype
-rw-r--r--h-source/Application/Controllers/DownloadController.php8
-rw-r--r--h-source/Application/Controllers/HostcontrollersController.php (renamed from h-source/Application/Controllers/PcmciaController.php)30
-rw-r--r--h-source/Application/Controllers/PrintersController.php2
-rw-r--r--h-source/Application/Include/hardware.php54
-rw-r--r--h-source/Application/Include/languages.php33
-rw-r--r--h-source/Application/Include/myFunctions.php3
-rw-r--r--h-source/Application/Include/vendorTranslations.php5
-rw-r--r--h-source/Application/Include/version.php4
-rw-r--r--h-source/Application/Models/GenericModel.php2
-rw-r--r--h-source/Application/Models/HostcontrollersModel.php (renamed from h-source/Application/Models/PcmciaModel.php)11
-rw-r--r--h-source/Application/Views/Desktop/Download/index.php4
-rw-r--r--h-source/Application/Views/Desktop/Hardware/left.php2
-rw-r--r--h-source/Application/Views/Desktop/Search/lspci_results.php23
-rw-r--r--h-source/Application/Views/Desktop/catalogue.php8
-rw-r--r--h-source/Application/Views/Desktop/form.php3
-rw-r--r--h-source/Application/Views/Desktop/if_page_deleted.php1
-rw-r--r--h-source/Application/Views/Desktop/page.php6
-rw-r--r--h-source/Application/Views/Mobile/Hardware/left.php4
-rw-r--r--h-source/Application/Views/Mobile/catalogue.php9
-rw-r--r--h-source/Application/Views/Mobile/if_page_deleted.php1
-rw-r--r--h-source/Application/Views/Mobile/page.php6
-rw-r--r--h-source/Config/Route.php20
-rw-r--r--h-source/tables.sql4
23 files changed, 156 insertions, 87 deletions
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<id>".$row['hardware']['id_hard']."</id>\n";
$xml .= "\t\t<type>".$row['hardware']['type']."</type>\n";
- if ($type === 'notebook' or $type === 'printer')
+ if ($type === 'notebook' or $type === 'printer' or $type === 'host-controller' )
{
$xml .= "\t\t<subtype>".$row['hardware']['subtype']."</subtype>\n";
}
@@ -116,7 +116,7 @@ class DownloadController extends BaseController
{
$xml .= "\t\t<it_works>".$row['hardware']['video_card_works']."</it_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<it_works>".$row['hardware']['compatibility']."</it_works>\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/PcmciaController.php b/h-source/Application/Controllers/HostcontrollersController.php
index 889ca0f..b1c9404 100644
--- a/h-source/Application/Controllers/PcmciaController.php
+++ b/h-source/Application/Controllers/HostcontrollersController.php
@@ -20,32 +20,36 @@
if (!defined('EG')) die('Direct access not allowed!');
-class PcmciaController extends GenericController
+class HostcontrollersController extends GenericController
{
public function __construct($model, $controller, $queryString)
{
- $worksOptions = PCMCIAControllers::$select;
+ $worksOptions = Hostcontrollers::$select;
$worksField = 'compatibility';
- $interfaceOptions = PCMCIAControllers::$interface;
+ $interfaceOptions = Hostcontrollers::$interface;
parent::__construct($model, $controller, $queryString);
//load the model
$this->model('HardwareModel');
$this->model('RevisionsModel');
- $this->model('PcmciaModel');
+ $this->model('HostcontrollersModel');
$this->model('TalkModel');
- $this->mod = $this->m['PcmciaModel'];
+ $this->mod = $this->m['HostcontrollersModel'];
$this->m['HardwareModel']->id_user = $this->s['registered']->status['id_user'];
- $this->m['HardwareModel']->type = 'PCMCIA-controller';
+ $this->m['HardwareModel']->type = 'host-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');
+ $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,
@@ -53,26 +57,28 @@ class PcmciaController extends GenericController
'vendor:sanitizeString' => 'undef',
'comm_year:sanitizeString' => 'undef',
'compatibility:sanitizeString' => 'undef',
- 'interface:sanitizeString' => 'undef',
+ 'subtype:sanitizeString' => 'undef',
'sort-by:sanitizeString' => 'undef',
'search_string:sanitizeString' => 'undef'
);
$this->setArgKeys($argKeys);
- $data['title'] = 'Acquisition cards';
+ $data['title'] = 'Host controller';
$data['intefaceOptions'] = $interfaceOptions;
$data['worksOptions'] = $worksOptions;
$data['worksField'] = $worksField;
- $data['notFoundString'] = "No PCMCIA Controller found";
+ $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(
@@ -80,7 +86,7 @@ class PcmciaController extends GenericController
'vendor' => $this->viewArgs['vendor'],
'comm_year' => $this->viewArgs['comm_year'],
'compatibility' => $this->viewArgs['compatibility'],
- 'interface' => $this->viewArgs['interface'],
+ 'subtype' => $this->viewArgs['subtype'],
);
$this->mod->setWhereQueryClause($whereArray);
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 <b>Host Controllers</b> in the database" => "Scarica il file xml di tutti gli <b>Host Controller</b> 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 .= "<div class='viewall_popup_menu_status_item'>".$value."</div>\n";
$count++;
diff --git a/h-source/Application/Models/PcmciaModel.php b/h-source/Application/Models/HostcontrollersModel.php
index 538aa7a..8908052 100644
--- a/h-source/Application/Models/PcmciaModel.php
+++ b/h-source/Application/Models/HostcontrollersModel.php
@@ -20,10 +20,10 @@
if (!defined('EG')) die('Direct access not allowed!');
-class PcmciaModel extends GenericModel
+class HostcontrollersModel extends GenericModel
{
- public $type = 'PCMCIA-controller'; //device type
+ public $type = 'host-controller'; //device type
public function __construct()
{
@@ -32,24 +32,25 @@ class PcmciaModel extends GenericModel
'vendor' => 'vendor',
'comm_year' => 'comm_year',
'compatibility' => 'compatibility',
- 'interface' => 'interface',
+ 'subtype' => 'subtype',
);
$this->_popupLabels = array(
'vendor' => gtext("vendor"),
'comm_year' => gtext("year"),
'compatibility' => gtext("does it work?"),
- 'interface' => gtext("interface"),
+ 'subtype' => gtext("subtype"),
);
$this->setPopupFunctions();
- $this->createPopupWhere('vendor,compatibility,comm_year,interface');
+ $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"),
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 @@
<td><a href="<?php echo $this->baseUrl."/download/raidadapters/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
</tr>
<tr>
- <td><?php echo gtext("Download the xml file of all the <b>PCMCIA Controllers</b> in the database");?></td>
- <td><a href="<?php echo $this->baseUrl."/download/pcmcia/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
+ <td><?php echo gtext("Download the xml file of all the <b>Host Controllers</b> in the database");?></td>
+ <td><a href="<?php echo $this->baseUrl."/download/hostcontrollers/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
</tr>
</table>
</div>
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 @@
</div>
<div class="hardware_element">
- <img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/1282042718_hardware.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/pcmcia/catalogue/<?php echo $lang;?>"><?php echo gtext("PCMCIA Controllers");?></a>
+ <img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/1282042718_hardware.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/hostcontrollers/catalogue/<?php echo $lang;?>"><?php echo gtext("Host Controllers");?></a>
</div>
</div> \ 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 @@
</div>
<div class="lspci_item_found_compat">
<?php
- switch ($row['hardware']['type'])
- {
- case 'wifi':
- echo gtext("does it work with free software?"). " <b>".gtext($row['hardware']['wifi_works'])."</b>";
- break;
- case 'videocard':
- echo gtext("does it work with free software?"). " <b>".gtext(Videocard::$videoReverse[$row['hardware']['video_card_works']])."</b>";
- break;
- case 'soundcard':
- echo gtext("does it work with free software?"). " <b>".gtext($row['hardware']['sound_card_works'])."</b>";
- break;
- case 'ethernet-card':
- echo gtext("does it work with free software?"). " <b>".gtext($row['hardware']['ethernet_card_works'])."</b>";
- break;
- case 'acquisition-card':
- echo gtext("does it work with free software?"). " <b>".gtext($row['hardware']['compatibility'])."</b>";
- break;
- case 'sd-card-reader':
- echo gtext("does it work with free software?"). " <b>".gtext($row['hardware']['sd_card_works'])."</b>";
- break;
- }
+ echo gtext("does it work with free software?"). " <b>".gtext($row['hardware'][Hardware::getWorksFieldFromType($row['hardware']['type'])])."</b>";
?>
</div>
</div>
@@ -94,6 +74,7 @@
<img align="top" class="catalogue_item_icon" src="<?php echo Hardware::getIconFromClass($device['classId']);?>"> <span class="search_result_model_name"><?php echo "<b>".Hardware::getTypeFromClass($device['classId'])."</b> - ".$device['deviceName'];?></span>
<div class="lspci_item_found_compat">
<ul>
+ <li><b><?php echo gtext("device type");?>:</b><?php echo $device['className'];?></li>
<li><b><?php echo gtext("vendor");?>:</b><?php echo $device['vendorName'];?></li>
<li><b><?php echo gtext("VendorID:ProductID code of the device");?></b>: <?php echo $device['vendorId'].":".$device['deviceId'];?></li>
</ul>
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 @@
</div>
<?php } ?>
- <?php if (strcmp($this->controller,'notebooks') === 0 ) { ?>
+ <?php if (strcmp($this->controller,'notebooks') === 0 or strcmp($this->controller,'hostcontrollers') === 0) { ?>
<div class="notebook_vendor">
+ <?php if (strcmp($this->controller,'notebooks') === 0) { ?>
<div class="inner_label"><?php echo gtext("subtype");?> (<?php echo gtext("notebook");?>, <?php echo gtext("netbook");?>, <?php echo gtext("motherboard");?>, <?php echo gtext("tablet");?>):</div>
- <div class="inner_value"><b><?php echo gtext($item['hardware']['subtype']);?></b></div>
+ <?php } else { ?>
+ <div class="inner_label"><?php echo gtext("subtype");?> (<?php echo $subtypeHelpLabel;?>):</div>
+ <?php } ?>
+ <div class="inner_value"><b><?php echo translate_and_gtext($item['hardware']['subtype']);?></b></div>
</div>
<?php } ?>
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 @@
<div class="entry_label"><?php echo gtext("subtype");?> (laser, inkjet, ..):</div>
<?php echo Html_Form::select('subtype',$values['subtype'],Printer::$subtype,"select_entry");?>
</div>
+ <?php } else if (strcmp($this->controller,'hostcontrollers') === 0 ) { ?>
+ <div class="entry_label"><?php echo gtext("subtype");?> (<?php echo $subtypeHelpLabel;?>):</div>
+ <?php echo Html_Form::select('subtype',$values['subtype'],Hostcontrollers::$subtype,"select_entry");?>
<?php } ?>
<div class="form_entry">
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 @@
<div class="notebooks_viewall">
<div class="revision_alert">
+ <?php echo gtext('Thanks for your contribution!'); ?><br />
<?php echo gtext('The device page has to be approved by an administrator of the website'); ?>
</div>
</div>
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 @@
<div class="inner_value"><b><?php echo betterVendor($item[$tableName]['vendor']);?></b></div>
</div>
- <?php if (strcmp($this->controller,'printers') === 0 ) { ?>
+ <?php if (strcmp($this->controller,'printers') === 0 or strcmp($this->controller,'hostcontrollers') === 0) { ?>
<div class="notebook_vendor">
- <div class="inner_label"><?php echo gtext("subtype");?> (laser, inkjet, ..):</div>
- <div class="inner_value"><b><?php echo gtext($item[$tableName]['subtype']);?></b></div>
+ <div class="inner_label"><?php echo gtext("subtype");?> (<?php echo $subtypeHelpLabel;?>):</div>
+ <div class="inner_value"><b><?php echo translate_and_gtext($item[$tableName]['subtype']);?></b></div>
</div>
<?php } ?>
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 @@
</a>
</li>
<li>
- <a href="<?php echo $this->baseUrl?>/pcmcia/catalogue/<?php echo $lang;?>">
- <?php echo gtext("PCMCIA Controllers");?>
+ <a href="<?php echo $this->baseUrl?>/hostcontrollers/catalogue/<?php echo $lang;?>">
+ <?php echo gtext("Host Controllers");?>
<img class="image_thumb_list" src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/1282042718_hardware.png" />
</a>
</li>
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 @@
<p><?php echo gtext("possible other names of the device");?>: <b><?php echo nl2br($item['hardware']['other_names']);?></b></p>
<?php } ?>
- <?php if (strcmp($this->controller,'notebooks') === 0 ) { ?>
+ <?php if (strcmp($this->controller,'notebooks') === 0 or strcmp($this->controller,'hostcontrollers') === 0) { ?>
<p>
- <?php echo gtext("subtype");?> (<?php echo gtext("notebook");?>, <?php echo gtext("netbook");?>, <?php echo gtext("motherboard");?>, <?php echo gtext("tablet");?>): <b><?php echo gtext($item['hardware']['subtype']);?></b>
+ <?php if (strcmp($this->controller,'notebooks') === 0) { ?>
+ <?php echo gtext("subtype");?> (<?php echo gtext("notebook");?>, <?php echo gtext("netbook");?>, <?php echo gtext("motherboard");?>, <?php echo gtext("tablet");?>)
+ <?php } else { ?>
+ <?php echo gtext("subtype");?> (<?php echo $subtypeHelpLabel;?>)
+ <?php } ?>
+ : <b><?php echo translate_and_gtext($item['hardware']['subtype']);?></b>
</p>
<?php } ?>
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 @@
<div class="notebooks_viewall">
<div class="revision_alert">
+ <?php echo gtext('Thanks for your contribution!'); ?><br />
<?php echo gtext('The device page has to be approved by an administrator of the website'); ?>
</div>
</div>
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 @@
<div class="ui-block-b"><b><?php echo singular($this->controller);?></b></div>
</div>
- <?php if (strcmp($this->controller,'printers') === 0 ) { ?>
+ <?php if (strcmp($this->controller,'printers') === 0 or strcmp($this->controller,'hostcontrollers') === 0) { ?>
<div class="ui-grid-a main_content_element">
- <div class="ui-block-a"><?php echo gtext("subtype");?> (laser, inkjet, ..):</div>
- <div class="ui-block-b"><b><?php echo gtext($item[$tableName]['subtype']);?></b></div>
+ <div class="ui-block-a"><?php echo gtext("subtype");?> (<?php echo $subtypeHelpLabel;?>):</div>
+ <div class="ui-block-b"><b><?php echo translate_and_gtext($item[$tableName]['subtype']);?></b></div>
</div>
<?php } ?>
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',