summaryrefslogtreecommitdiff
path: root/includes/helper
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-07-18 21:38:53 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2017-07-19 11:44:16 +0200
commit3a1e4602492cec1c8f3d2aabab2c866022f43bf1 (patch)
treec367c1ce15f957a1e9a0879b875e8d635883280e /includes/helper
parent04217834fa4e6f94fec0836a80ea5526b8ebc9bc (diff)
Changed $_GET, $_POST and $_REQUEST to use the Request object
Diffstat (limited to 'includes/helper')
-rw-r--r--includes/helper/internationalization_helper.php8
1 files changed, 4 insertions, 4 deletions
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();