From b588efb71e62470d96a85528960a7e2385e934b0 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Sun, 6 Mar 2011 16:13:52 +0000 Subject: improved DownloadController --- .../Application/Controllers/DownloadController.php | 20 +++++++++++++++++++- h-source/Application/Include/languages.php | 1 + h-source/Application/Views/Download/index.php | 4 ++++ h-source/Config/Route.php | 1 + 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/h-source/Application/Controllers/DownloadController.php b/h-source/Application/Controllers/DownloadController.php index 72292f6..f79fe7e 100644 --- a/h-source/Application/Controllers/DownloadController.php +++ b/h-source/Application/Controllers/DownloadController.php @@ -113,6 +113,11 @@ class DownloadController extends BaseController $xml .= "\t\t".$row['hardware']['sound_card_works']."\n"; } + if ($type === 'bluetooth') + { + $xml .= "\t\t".$row['hardware']['bluetooth_works']."\n"; + } + if ($type === 'webcam') { $xml .= "\t\t".$row['hardware']['webcam_works']."\n"; @@ -123,7 +128,7 @@ class DownloadController extends BaseController $xml .= "\t\t".$row['hardware']['video_card_works']."\n"; } - if ($type === 'printer' or $type === 'scanner' or $type === 'soundcard' or $type === 'webcam') + if ($type === 'printer' or $type === 'scanner' or $type === 'soundcard' or $type === 'webcam' or $type === 'bluetooth') { $xml .= "\t\t".$row['hardware']['driver']."\n"; } @@ -257,4 +262,17 @@ class DownloadController extends BaseController $this->clean(); $this->load('xml'); } + + public function bluetooth($lang = 'en') + { + header ("Content-Type:text/xml"); + + $res = $this->m['HardwareModel']->clear()->select()->where(array('type'=>'bluetooth','-deleted'=>'no'))->orderBy("type,hardware.id_hard")->send(); + + $data['xml'] = $this->getXml($res); + + $this->append($data); + $this->clean(); + $this->load('xml'); + } } \ No newline at end of file diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php index ffcef4e..a1b5ab1 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -214,6 +214,7 @@ class Lang "Watch all the actions carried out by administrators" => "Guarda tutte le azioni compiute dagli amministratori", "No bluetooth devices found" => "Non รจ stato trovato alcun dispositivo bluetooth", "learn how to find it" => "scopri come individuarlo", + "Download the xml file of all the bluetooth devices in the database" => "Scarica il file xml di tutti i dispositivi bluetooth presenti nel database", ), 'es' => array ( diff --git a/h-source/Application/Views/Download/index.php b/h-source/Application/Views/Download/index.php index c153fb8..1eb2a63 100644 --- a/h-source/Application/Views/Download/index.php +++ b/h-source/Application/Views/Download/index.php @@ -73,6 +73,10 @@ webcams in the database");?> "> + + bluetooth devices in the database");?> + "> + diff --git a/h-source/Config/Route.php b/h-source/Config/Route.php index 48521b5..9333134 100644 --- a/h-source/Config/Route.php +++ b/h-source/Config/Route.php @@ -100,6 +100,7 @@ class Route 'download,threegcards', 'download,soundcards', 'download,webcams', + 'download,bluetooth', 'history,hide', 'history,show', 'history,block', -- cgit v1.2.3