From 2203972e6569ba1a009744f485473c69a694d83d Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Fri, 12 Apr 2013 21:27:51 -0400 Subject: [PATCH] Reload locales after a save_config() --- miniflux/model.php | 2 ++ miniflux/vendor/PicoTools/Translator.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/miniflux/model.php b/miniflux/model.php index b633f66..e6b2fac 100644 --- a/miniflux/model.php +++ b/miniflux/model.php @@ -460,5 +460,7 @@ function save_config(array $values) $_SESSION['user']['language'] = $values['language']; unset($_COOKIE['language']); + \PicoTools\Translator\load($values['language']); + return \PicoTools\singleton('db')->table('config')->update($values); } diff --git a/miniflux/vendor/PicoTools/Translator.php b/miniflux/vendor/PicoTools/Translator.php index 832635c..e2ce27d 100644 --- a/miniflux/vendor/PicoTools/Translator.php +++ b/miniflux/vendor/PicoTools/Translator.php @@ -110,7 +110,7 @@ namespace PicoTools\Translator { { static $values = array(); - if ($locales) { + if ($locales !== null) { $values = $locales; }