hopefully fix locales
This commit is contained in:
parent
dfd05e88f9
commit
3a552e5b76
@ -335,7 +335,7 @@ function create_antibot($board, $thread = null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function rebuildThemes($action, $boardname = false) {
|
function rebuildThemes($action, $boardname = false) {
|
||||||
global $config, $board;
|
global $config, $board, $current_locale;
|
||||||
|
|
||||||
// Save the global variables
|
// Save the global variables
|
||||||
$_config = $config;
|
$_config = $config;
|
||||||
@ -347,7 +347,14 @@ function rebuildThemes($action, $boardname = false) {
|
|||||||
while ($theme = $query->fetch(PDO::FETCH_ASSOC)) {
|
while ($theme = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||||
// Restore them
|
// Restore them
|
||||||
$config = $_config;
|
$config = $_config;
|
||||||
$board = $_board;
|
$board = $_board;
|
||||||
|
|
||||||
|
// Reload the locale
|
||||||
|
if ($config['locale'] != $current_locale) {
|
||||||
|
$current_locale = $config['locale'];
|
||||||
|
init_locale($config['locale'], $error);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
rebuildTheme($theme['theme'], $action, $boardname);
|
rebuildTheme($theme['theme'], $action, $boardname);
|
||||||
}
|
}
|
||||||
@ -355,6 +362,12 @@ function rebuildThemes($action, $boardname = false) {
|
|||||||
// Restore them again
|
// Restore them again
|
||||||
$config = $_config;
|
$config = $_config;
|
||||||
$board = $_board;
|
$board = $_board;
|
||||||
|
|
||||||
|
// Reload the locale
|
||||||
|
if ($config['locale'] != $current_locale) {
|
||||||
|
$current_locale = $config['locale'];
|
||||||
|
init_locale($config['locale'], $error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user