diff options
author | Antonio Gallo <tonicucoz@gmail.com> | 2011-09-02 13:07:26 +0000 |
---|---|---|
committer | Antonio Gallo <tonicucoz@gmail.com> | 2011-09-02 13:07:26 +0000 |
commit | 2dfe9420c48529dc840e68bf37fb41c59f7a0092 (patch) | |
tree | d99a3efa689156396b426320ff4448c3d3bb0c7a /h-source | |
parent | fd57650409ddb4cee2f7b5f2df7183b569eeb3ce (diff) |
now x84-64/amd64 label is printed
Diffstat (limited to 'h-source')
-rw-r--r-- | h-source/Application/Include/hardware.php | 18 | ||||
-rw-r--r-- | h-source/Application/Models/NotebooksModel.php | 4 | ||||
-rw-r--r-- | h-source/Application/Views/Notebooks/catalogue.php | 2 | ||||
-rw-r--r-- | h-source/Application/Views/Notebooks/page.php | 2 |
4 files changed, 24 insertions, 2 deletions
diff --git a/h-source/Application/Include/hardware.php b/h-source/Application/Include/hardware.php index 04db6ca..2e5cb0e 100644 --- a/h-source/Application/Include/hardware.php +++ b/h-source/Application/Include/hardware.php @@ -21,8 +21,26 @@ if (!defined('EG')) die('Direct access not allowed!'); +function translate($string) +{ + return Hardware::translate($string); +} + class Hardware { + + public static $translations = array( + "amd64" => 'x86-64/amd64', + ); + + public static function translate($string) + { + if (array_key_exists($string,self::$translations)) + { + return self::$translations[$string]; + } + return $string; + } public static $controllers = array('notebooks','wifi','videocards','printers','scanners','threegcards','soundcards','webcams','bluetooth','acquisitioncards','fingerprintreaders','ethernetcards'); //used by UsersController::login() diff --git a/h-source/Application/Models/NotebooksModel.php b/h-source/Application/Models/NotebooksModel.php index d235f74..40052d4 100644 --- a/h-source/Application/Models/NotebooksModel.php +++ b/h-source/Application/Models/NotebooksModel.php @@ -79,6 +79,10 @@ class NotebooksModel extends GenericModel { 'architecture' => gtext("architecture"), ); + $this->_popupFunctions = array( + 'architecture' => 'translate', + ); + $this->createPopupWhere('bios,architecture'); } diff --git a/h-source/Application/Views/Notebooks/catalogue.php b/h-source/Application/Views/Notebooks/catalogue.php index 209d355..7538e6f 100644 --- a/h-source/Application/Views/Notebooks/catalogue.php +++ b/h-source/Application/Views/Notebooks/catalogue.php @@ -39,7 +39,7 @@ </div> <div class="viewall_popup_menu_status"> <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['bios']?></div> - <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['architecture']?></div> + <div class="viewall_popup_menu_status_item"><?php echo Hardware::translate($this->viewArgs['architecture']);?></div> </div> </div> diff --git a/h-source/Application/Views/Notebooks/page.php b/h-source/Application/Views/Notebooks/page.php index 525d9e1..9c30f86 100644 --- a/h-source/Application/Views/Notebooks/page.php +++ b/h-source/Application/Views/Notebooks/page.php @@ -56,7 +56,7 @@ <div class="notebook_vendor"> <div class="inner_label"><?php echo gtext("architecture");?>:</div> - <div class="inner_value"><b><?php echo $item[$tableName]['architecture'];?></b></div> + <div class="inner_value"><b><?php echo Hardware::translate($item[$tableName]['architecture']);?></b></div> </div> <div class="notebook_vendor"> |