Skip to content

Commit

Permalink
* [FIX] Fixed language detection issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nuxsmin committed Oct 1, 2015
1 parent c6a449b commit 61222f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions ajax/ajax_userPrefsSave.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@
// Acción al cerrar la vista
$doActionOnClose = "sysPassUtil.Common.doAction($actionId,'',$activeTab);";

if (SP\Util::demoIsEnabled() && \SP\Session::getUserLogin() === 'demo') {
SP\Common::printJSON(_('Ey, esto es una DEMO!!'));
}

if ($actionId === SP\Controller\ActionsInterface::ACTION_USR_PREFERENCES_GENERAL) {
$userLang = SP\Request::analyze('userlang');
$userTheme = SP\Request::analyze('usertheme', 'material-blue');
Expand Down Expand Up @@ -81,6 +77,10 @@

SP\Common::printJSON(_('Preferencias actualizadas'), 0, $doActionOnClose);
} else if ($actionId === SP\Controller\ActionsInterface::ACTION_USR_PREFERENCES_SECURITY) {
if (SP\Util::demoIsEnabled() && \SP\Session::getUserLogin() === 'demo') {
SP\Common::printJSON(_('Ey, esto es una DEMO!!'));
}

// Variables POST del formulario
$twoFaEnabled = SP\Request::analyze('security_2faenabled', 0, false, 1);
$pin = SP\Request::analyze('security_pin', 0);
Expand Down
2 changes: 1 addition & 1 deletion inc/Themes.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public static function setTheme($force = false)

$theme = ($userTheme) ? $userTheme : $globalTheme;

Session::setLocale($theme);
Session::setTheme($theme);
}

self::setThemePaths($theme);
Expand Down

6 comments on commit 61222f1

@SteeveGL
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The language still doesn't switch. Always Spanish to me.

@nuxsmin
Copy link
Owner Author

@nuxsmin nuxsmin commented on 61222f1 Oct 1, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can force that by expiring the PHP session cookie in your browser. Does it work?

@SteeveGL
Copy link

@SteeveGL SteeveGL commented on 61222f1 Oct 1, 2015 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nuxsmin
Copy link
Owner Author

@nuxsmin nuxsmin commented on 61222f1 Oct 1, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested it on 3 environments and it works fine. The issue fixed on last commit is related to a wrong session bar set, so expiring sessions should be enough.

I've noticed of that issue when deployed to the demo version, and after some find outs it was fixed. Do you have the latest commit? It should be 61222f1

@nuxsmin
Copy link
Owner Author

@nuxsmin nuxsmin commented on 61222f1 Oct 2, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a previous commit that was superseded by this release https://github.com/nuxsmin/sysPass/tree/1.2.0.03-rc3 which takes care about that issue.

Thanks for your support!!

@SteeveGL
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created a new issue has this commit is not the last one and the last one do not fix this ether.
#132

Please sign in to comment.