Update /lang route

This commit is contained in:
Julien VAUBOURG 2015-07-08 19:41:00 +02:00
parent 5889e2eba2
commit 6e26e8dbdb

View File

@ -218,7 +218,7 @@ dispatch('/status', function() {
});
dispatch('/lang/:locale', function($locale = 'en') {
switch ($locale) {
switch($locale) {
case 'fr':
$_SESSION['locale'] = 'fr';
break;
@ -227,9 +227,5 @@ dispatch('/lang/:locale', function($locale = 'en') {
$_SESSION['locale'] = 'en';
}
if(!empty($_GET['redirect_to'])) {
redirect_to($_GET['redirect_to']);
} else {
redirect_to('/');
}
});