summaryrefslogtreecommitdiff
path: root/includes/controller/user_driver_licenses_controller.php
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/controller/user_driver_licenses_controller.php
parent04217834fa4e6f94fec0836a80ea5526b8ebc9bc (diff)
Changed $_GET, $_POST and $_REQUEST to use the Request object
Diffstat (limited to 'includes/controller/user_driver_licenses_controller.php')
-rw-r--r--includes/controller/user_driver_licenses_controller.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/includes/controller/user_driver_licenses_controller.php b/includes/controller/user_driver_licenses_controller.php
index 3098c8ce..fef278dd 100644
--- a/includes/controller/user_driver_licenses_controller.php
+++ b/includes/controller/user_driver_licenses_controller.php
@@ -74,11 +74,11 @@ function user_driver_license_edit_link($user = null)
function user_driver_license_load_user()
{
global $user;
-
+ $request = request();
$user_source = $user;
- if (isset($_REQUEST['user_id'])) {
- $user_source = User($_REQUEST['user_id']);
+ if ($request->has('user_id')) {
+ $user_source = User($request->input('user_id'));
if ($user_source == null) {
redirect(user_driver_license_edit_link());
}
@@ -95,7 +95,7 @@ function user_driver_license_load_user()
function user_driver_license_edit_controller()
{
global $privileges, $user;
-
+ $request = request();
$user_source = user_driver_license_load_user();
// only privilege admin_user can edit other users driver license information
@@ -111,15 +111,15 @@ function user_driver_license_edit_controller()
$wants_to_drive = true;
}
- if (isset($_REQUEST['submit'])) {
- $wants_to_drive = isset($_REQUEST['wants_to_drive']);
+ if ($request->has('submit')) {
+ $wants_to_drive = $request->has('wants_to_drive');
if ($wants_to_drive) {
- $user_driver_license['has_car'] = isset($_REQUEST['has_car']);
- $user_driver_license['has_license_car'] = isset($_REQUEST['has_license_car']);
- $user_driver_license['has_license_3_5t_transporter'] = isset($_REQUEST['has_license_3_5t_transporter']);
- $user_driver_license['has_license_7_5t_truck'] = isset($_REQUEST['has_license_7_5t_truck']);
- $user_driver_license['has_license_12_5t_truck'] = isset($_REQUEST['has_license_12_5t_truck']);
- $user_driver_license['has_license_forklift'] = isset($_REQUEST['has_license_forklift']);
+ $user_driver_license['has_car'] = $request->has('has_car');
+ $user_driver_license['has_license_car'] = $request->has('has_license_car');
+ $user_driver_license['has_license_3_5t_transporter'] = $request->has('has_license_3_5t_transporter');
+ $user_driver_license['has_license_7_5t_truck'] = $request->has('has_license_7_5t_truck');
+ $user_driver_license['has_license_12_5t_truck'] = $request->has('has_license_12_5t_truck');
+ $user_driver_license['has_license_forklift'] = $request->has('has_license_forklift');
if (UserDriverLicense_valid($user_driver_license)) {
if ($user_driver_license['user_id'] == null) {