commit d69e8e8cde14d0ff953e891eb9e6c7d12ae584f4
parent 651b9788468f4d24a4949c49a45c9ebd2f09eb08
Author: Jan Dankert <devnull@localhost>
Date: Thu, 4 Jan 2018 22:53:36 +0100
Beim Speichern des Profils das neue Language-Modul zum Setzen der Sprache benutzen.
Diffstat:
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/modules/cms-core/action/ProfileAction.class.php b/modules/cms-core/action/ProfileAction.class.php
@@ -19,6 +19,7 @@ namespace cms\action;
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+use language\Language;
use LogicException;
use Mail;
use security\Base2n;
@@ -296,16 +297,7 @@ class ProfileAction extends Action
public function setLanguage($l)
{
global $conf;
- $langFile = OR_LANGUAGE_DIR . 'lang-' . $l . '.' . PHP_EXT;
-
- // Pruefen, ob Sprache vorhanden ist.
- if (!file_exists($langFile))
- throw new LogicException("Languagefile $langFile does not exist.");
-
- $lang = array();
- require($langFile); // Setzt $lang
- global $conf;
- $conf['language'] = $lang;
+ $conf['language'] = Language::getLanguage($l,PRODUCTION);
$conf['language']['language_code'] = $l;
Session::setConfig($conf);
}