From 3a1e4602492cec1c8f3d2aabab2c866022f43bf1 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Tue, 18 Jul 2017 21:38:53 +0200 Subject: Changed $_GET, $_POST and $_REQUEST to use the Request object --- includes/helper/internationalization_helper.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'includes/helper/internationalization_helper.php') diff --git a/includes/helper/internationalization_helper.php b/includes/helper/internationalization_helper.php index ed16de15..d2dbcdbd 100644 --- a/includes/helper/internationalization_helper.php +++ b/includes/helper/internationalization_helper.php @@ -26,12 +26,12 @@ function locale_short() function gettext_init() { $locales = config('locales'); - $default_locale = config('default_locale'); + $request = request(); - if (isset($_REQUEST['set_locale']) && isset($locales[$_REQUEST['set_locale']])) { - $_SESSION['locale'] = $_REQUEST['set_locale']; + if ($request->has('set_locale') && isset($locales[$request->input('set_locale')])) { + $_SESSION['locale'] = $request->input('set_locale'); } elseif (!isset($_SESSION['locale'])) { - $_SESSION['locale'] = $default_locale; + $_SESSION['locale'] = config('default_locale'); } gettext_locale(); -- cgit v1.2.3-54-g00ecf