aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2013-01-10 07:46:18 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2013-01-10 07:46:18 +0000
commit79a99ab125e22b5918790711c470e2199a7bff6d (patch)
tree88f130eae580d01e3fccd84b8b9bd02d4067e570
parent9938c667ccfeec0ed0558765da5d9dc7e48e0def (diff)
when a device has not been found by lspci search page, the insert link now sends to the page where to insert that device
-rw-r--r--h-source/Application/Controllers/SearchController.php15
-rw-r--r--h-source/Application/Include/languages.php1
-rw-r--r--h-source/Application/Views/Desktop/Search/lspci_results.php2
3 files changed, 2 insertions, 16 deletions
diff --git a/h-source/Application/Controllers/SearchController.php b/h-source/Application/Controllers/SearchController.php
index ca798d6..1892f70 100644
--- a/h-source/Application/Controllers/SearchController.php
+++ b/h-source/Application/Controllers/SearchController.php
@@ -137,11 +137,6 @@ class SearchController extends BaseController
if (next($lspciArray) !== false)
{
$item = trim(current($lspciArray));
-// if( !preg_match( '/^[a-zA-Z0-9\-\_\.\,\;\:\+\s\(\)\/\[\]\#]+$/i', $item ) )
-// {
-// $flag = false;
-// break;
-// }
if( preg_match( '/Class\:(.*)\[(.*)\]/i', $item, $matches ) )
{
$temp['className'] = sanitizeAll($matches[1]);
@@ -163,11 +158,6 @@ class SearchController extends BaseController
if (next($lspciArray) !== false)
{
$item = trim(current($lspciArray));
-// if( !preg_match( '/^[a-zA-Z0-9\-\_\.\,\;\:\+\s\(\)\/\[\]\#]+$/i', $item ) )
-// {
-// $flag = false;
-// break;
-// }
if( preg_match( '/Vendor\:(.*)\[(.*)\]/i', $item, $matches ) )
{
$temp['vendorName'] = sanitizeAll($matches[1]);
@@ -189,11 +179,6 @@ class SearchController extends BaseController
if (next($lspciArray) !== false)
{
$item = trim(current($lspciArray));
-// if( !preg_match( '/^[a-zA-Z0-9\-\_\.\,\;\:\+\s\(\)\/\[\]\#]+$/i', $item ) )
-// {
-// $flag = false;
-// break;
-// }
if( preg_match( '/Device\:(.*)\[(.*)\]/i', $item, $matches ) )
{
$temp['deviceName'] = sanitizeAll($matches[1]);
diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php
index 5b3dc62..c2e06f3 100644
--- a/h-source/Application/Include/languages.php
+++ b/h-source/Application/Include/languages.php
@@ -417,6 +417,7 @@ class Lang
/*0356*/"see the details inside the description entry" => "guarda i dettagli all'interno del campo descrizione",
/*0357*/"Thanks for helping the h-node project and the free software movement!" => "Grazie per aver aiutato il progetto h-node e il movimento del software libero!",
/*0357*/"You have just inserted a new notebook into the database. Can you please insert its devices separately too? Thanks!" => "Hai appena inserito un nuovo portatile. Potresti gentilmente inserire separatamente anche i suoi dispositivi?",
+ /*0358*/"insert" => "inserisci",
),
'es' => array
(
diff --git a/h-source/Application/Views/Desktop/Search/lspci_results.php b/h-source/Application/Views/Desktop/Search/lspci_results.php
index 970789b..c8da509 100644
--- a/h-source/Application/Views/Desktop/Search/lspci_results.php
+++ b/h-source/Application/Views/Desktop/Search/lspci_results.php
@@ -78,7 +78,7 @@
<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>
- <a href="<?php echo Go::toHardwareType(Hardware::getTypeFromClass($device['classId']));?>"><img align="top" src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/agt_forward.png"> insert</a>
+ <a href="<?php echo $this->baseUrl."/".Hardware::getControllerFromType(Hardware::getTypeFromClass($device['classId']))."/insert/$lang";?>"><img align="top" src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/agt_forward.png"> <?php echo gtext("insert");?></a>
</div>
</div>
</div>