From 67f94bb059506bf617d69a8af67e96a7f62632e8 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Thu, 3 Feb 2011 13:43:43 +0000 Subject: improved login --- h-source/Application/Controllers/UsersController.php | 6 +++--- h-source/Application/Include/languages.php | 7 ++++++- h-source/Application/Views/Users/login.php | 8 ++++++++ h-source/Application/Views/right.php | 2 +- 4 files changed, 18 insertions(+), 5 deletions(-) (limited to 'h-source') diff --git a/h-source/Application/Controllers/UsersController.php b/h-source/Application/Controllers/UsersController.php index 2bbc5e3..1249647 100644 --- a/h-source/Application/Controllers/UsersController.php +++ b/h-source/Application/Controllers/UsersController.php @@ -79,7 +79,7 @@ class UsersController extends BaseController switch($choice) { case 'logged': - $this->redirect('home/index',3,'You are already logged...'); + $this->redirect('home/index/'.Lang::$current,3,'You are already logged...'); break; case 'accepted': if (isset($type)) @@ -90,7 +90,7 @@ class UsersController extends BaseController } else { - $this->redirect('home/index',0); + $this->redirect('home/index/'.Lang::$current,0); } break; case 'login-error': @@ -117,7 +117,7 @@ class UsersController extends BaseController } else if ($res === 'was-logged') { - $this->redirect('home',0); + $this->redirect('home/index/'.Lang::$current,0); } else if ($res === 'error') { diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php index a315339..00fbeec 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -153,6 +153,7 @@ class Lang "write here the output of lspci -vmmnn" => "scrivi qui l'output del comando lspci -vmmnn", "The following devices has been found in the database" => "I seguenti device sono stati trovati nel database", "yes" => "sì", + "no" => "no", "The following devices has not been found in the database" => "I seguenti device non sono stati trovati nel database", "can you please insert them?" => "puoi gentilmente inserirli?", ), @@ -356,7 +357,11 @@ class Go { return "http://".DOMAIN_NAME."/".Hardware::getControllerFromType($type)."/catalogue/".Lang::$current; } - + + public static function toHardwareInsert($type) + { + return "http://".DOMAIN_NAME."/".Hardware::getControllerFromType($type)."/insert/".Lang::$current; + } } class MyStrings diff --git a/h-source/Application/Views/Users/login.php b/h-source/Application/Views/Users/login.php index 52d8b8e..c0c129d 100755 --- a/h-source/Application/Views/Users/login.php +++ b/h-source/Application/Views/Users/login.php @@ -48,6 +48,14 @@ + + + + diff --git a/h-source/Application/Views/right.php b/h-source/Application/Views/right.php index a37e0a2..9684dc3 100644 --- a/h-source/Application/Views/right.php +++ b/h-source/Application/Views/right.php @@ -33,7 +33,7 @@
- (logout) + (">logout)