diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 91453d4acd..28edd98d17 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2012-05-31 Miguel de Dios <miguel.dedios@artica.es> + + * mobile/include/user.class.php: added option to get from url a + "autologin" with the user and the password for this action. + + * mobile/index.php: cleaned source code style. + 2012-05-31 Santiago Munin <burning1@gmail.com> * include/functions_tags.php: Added a method to get all tags. diff --git a/pandora_console/mobile/include/user.class.php b/pandora_console/mobile/include/user.class.php index a77efab037..9fda9b1d75 100644 --- a/pandora_console/mobile/include/user.class.php +++ b/pandora_console/mobile/include/user.class.php @@ -40,11 +40,20 @@ class User { //hack to compatibility with pandora global $config; $config['id_user'] = $this->user; - $this->system->setSessionBase('id_usuario', $this->user); + $this->system->setSessionBase('id_usuario', $this->user); } } public function isLogged() { + $autologin = $this->system->getRequest('autologin', false); + if ($autologin) { + $user = $this->system->getRequest('user', null); + $password = $this->system->getRequest('password', null); + if ($this->checkLogin($user, $password)) { + $this->hackinjectConfig(); + } + } + return $this->logged; } diff --git a/pandora_console/mobile/index.php b/pandora_console/mobile/index.php index f67982469d..2eb9e8e4fe 100644 --- a/pandora_console/mobile/index.php +++ b/pandora_console/mobile/index.php @@ -14,7 +14,7 @@ //Set character encoding to UTF-8 - fixes a lot of multibyte character headaches if (function_exists ('mb_internal_encoding')) { - mb_internal_encoding ("UTF-8"); + mb_internal_encoding ("UTF-8"); } ob_start ();