From 9508654584ee8675efe6526f9f6a911ed0d5de90 Mon Sep 17 00:00:00 2001 From: juanmanuelr Date: Thu, 25 Jul 2013 13:19:59 +0000 Subject: [PATCH] 2013-07-25 Juan Manuel Ramon Vigo * include/functions.php: Modified function get_user_language . if it's called from metaconsole then user lang can be updated (support for external hashed call to Pandora). 2013-07-25 Juan Manuel Ramon Vigo * include/functions.php: Modified function get_user_language . if it's called from metaconsole then user lang can be updated (support for external hashed call to Pandora). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8577 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ pandora_console/include/functions.php | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 512301d685..790b13ee9d 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2013-07-25 Juan Manuel Ramon Vigo + + * include/functions.php: Modified function get_user_language + . if it's called from metaconsole then user lang can be + updated (support for external hashed call to Pandora). + 2013-07-25 Sergio Martin * include/constants.php: Move policy constants from diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 46f72b241d..75692ef9d1 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -327,6 +327,16 @@ function get_user_language ($id_user = null) { if ($quick_language) { $language = get_parameter('language', 0); + if (defined('METACONSOLE')) { + + if ($id_user == null) + $id_user = $config['id_user']; + + if ($language !== 0) + update_user($id_user, array('language' => $language)); + + } + if ($language === 'default') { return $config['language']; }