mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
issue #2397 keep language selection in the template loading function
This commit is contained in:
11
profile.php
11
profile.php
@@ -377,6 +377,17 @@ function load_profile_in_template($url_action, $url_redirect, $userdata, $templa
|
|||||||
$template->assign('template_selection', $userdata['theme']);
|
$template->assign('template_selection', $userdata['theme']);
|
||||||
$template->assign('template_options', get_pwg_themes());
|
$template->assign('template_options', get_pwg_themes());
|
||||||
|
|
||||||
|
foreach (get_languages() as $language_code => $language_name)
|
||||||
|
{
|
||||||
|
if (isset($_POST['submit']) or $userdata['language'] == $language_code)
|
||||||
|
{
|
||||||
|
$template->assign('language_selection', $language_code);
|
||||||
|
}
|
||||||
|
$language_options[$language_code] = $language_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign('language_options', $language_options);
|
||||||
|
|
||||||
$special_user = in_array($userdata['id'], array($conf['guest_id'], $conf['default_user_id']));
|
$special_user = in_array($userdata['id'], array($conf['guest_id'], $conf['default_user_id']));
|
||||||
$template->assign('SPECIAL_USER', $special_user);
|
$template->assign('SPECIAL_USER', $special_user);
|
||||||
$template->assign('IN_ADMIN', defined('IN_ADMIN'));
|
$template->assign('IN_ADMIN', defined('IN_ADMIN'));
|
||||||
|
|||||||
Reference in New Issue
Block a user