summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2014-10-09 04:09:30 +0200
committerczaks <marcin@6irc.net>2014-10-09 04:09:30 +0200
commit3a552e5b7696d19fbb9390f9ee7aad4ddc2f223e (patch)
treea5d636a756e27ba1ca95c9084f05d10ef24337b3
parentdfd05e88f9905bbd644e1847fa8ec383a9fc8857 (diff)
hopefully fix locales
-rwxr-xr-xinc/functions.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 8f33fdb6..06370d32 100755
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -335,7 +335,7 @@ function create_antibot($board, $thread = null) {
}
function rebuildThemes($action, $boardname = false) {
- global $config, $board;
+ global $config, $board, $current_locale;
// Save the global variables
$_config = $config;
@@ -347,7 +347,14 @@ function rebuildThemes($action, $boardname = false) {
while ($theme = $query->fetch(PDO::FETCH_ASSOC)) {
// Restore them
$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);
}
@@ -355,6 +362,12 @@ function rebuildThemes($action, $boardname = false) {
// Restore them again
$config = $_config;
$board = $_board;
+
+ // Reload the locale
+ if ($config['locale'] != $current_locale) {
+ $current_locale = $config['locale'];
+ init_locale($config['locale'], $error);
+ }
}