From e396d151b9c48339cc62c84bb728e2e03f479f4e Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Sat, 30 Oct 2010 17:38:27 +0000 Subject: improved the way interfaces can be listed --- h-source/Application/Include/hardware.php | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'h-source/Application/Include') diff --git a/h-source/Application/Include/hardware.php b/h-source/Application/Include/hardware.php index 828585f..cfa9350 100644 --- a/h-source/Application/Include/hardware.php +++ b/h-source/Application/Include/hardware.php @@ -85,7 +85,27 @@ class Wifi extends hardware "TP-LINK" => "TP-LINK", ); - public static $interface = "not-specified,USB,PCI,PCI-E,mini-PCI,mini-PCI-E,ExpressCard,PC-Card"; + public static $interface = array( + "not-specified" => "not-specified", + "USB" => "USB", + "PCI" => "PCI", + "PCI-E" => "PCI-E", + "mini-PCI" => "mini-PCI", + "mini-PCI-E" => "mini-PCI-E", + "ExpressCard" => "ExpressCard", + "PCMCIA/PC-Card" => "PC-Card", + ); + + public static $interfaceReverse = array( + "not-specified" => "not-specified", + "USB" => "USB", + "PCI" => "PCI", + "PCI-E" => "PCI-E", + "mini-PCI" => "mini-PCI", + "mini-PCI-E" => "mini-PCI-E", + "ExpressCard" => "ExpressCard", + "PC-Card" => "PCMCIA/PC-Card", + ); public static $wifiSelect = 'yes,no'; @@ -93,6 +113,11 @@ class Wifi extends hardware { return implode(',',array_values(self::$vendors)); } + + public static function interfaceList() + { + return implode(',',array_values(self::$interface)); + } } class Videocard extends hardware @@ -218,7 +243,7 @@ class Notebooks extends Hardware } -class ThreeGcards extends hardware +class ThreeGcards extends Wifi { public static $vendors = array( "AT&T" => "AT-T", @@ -235,8 +260,6 @@ class ThreeGcards extends hardware "ZTE" => "ZTE", ); - public static $interface = "not-specified,USB,PCI,PCI-E,mini-PCI,mini-PCI-E,ExpressCard,PC-Card"; - public static $select = 'yes,no'; public static function vendorsList() -- cgit v1.2.3