summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-11-19 13:17:34 +0100
committermsquare <msquare@notrademark.de>2017-11-19 13:19:56 +0100
commit88ea992f9cd17a4722965430c74d8cb27f18688f (patch)
treed99c5cda7e4064b3d652204e7d63c69363ab0965
parent4779771d089b4182252d279f7a8ea5d7ada211ad (diff)
fix sql queries with bools
-rw-r--r--includes/model/AngelType_model.php6
-rw-r--r--includes/model/UserDriverLicenses_model.php24
-rw-r--r--includes/model/User_model.php6
3 files changed, 18 insertions, 18 deletions
diff --git a/includes/model/AngelType_model.php b/includes/model/AngelType_model.php
index bc535667..69c4e13f 100644
--- a/includes/model/AngelType_model.php
+++ b/includes/model/AngelType_model.php
@@ -152,10 +152,10 @@ function AngelType_create($angeltype)
',
[
$angeltype['name'],
- (bool)$angeltype['restricted'],
+ (int)$angeltype['restricted'],
$angeltype['description'],
- (bool)$angeltype['requires_driver_license'],
- (bool)$angeltype['no_self_signup'],
+ (int)$angeltype['requires_driver_license'],
+ (int)$angeltype['no_self_signup'],
$angeltype['contact_user_id'],
$angeltype['contact_name'],
$angeltype['contact_dect'],
diff --git a/includes/model/UserDriverLicenses_model.php b/includes/model/UserDriverLicenses_model.php
index 798aa6ab..dc38368b 100644
--- a/includes/model/UserDriverLicenses_model.php
+++ b/includes/model/UserDriverLicenses_model.php
@@ -75,12 +75,12 @@ function UserDriverLicenses_create($user_driver_license, $user)
',
[
$user_driver_license['user_id'],
- (bool)$user_driver_license['has_car'],
- (bool)$user_driver_license['has_license_car'],
- (bool)$user_driver_license['has_license_3_5t_transporter'],
- (bool)$user_driver_license['has_license_7_5t_truck'],
- (bool)$user_driver_license['has_license_12_5t_truck'],
- (bool)$user_driver_license['has_license_forklift'],
+ (int)$user_driver_license['has_car'],
+ (int)$user_driver_license['has_license_car'],
+ (int)$user_driver_license['has_license_3_5t_transporter'],
+ (int)$user_driver_license['has_license_7_5t_truck'],
+ (int)$user_driver_license['has_license_12_5t_truck'],
+ (int)$user_driver_license['has_license_forklift'],
]
);
@@ -106,12 +106,12 @@ function UserDriverLicenses_update($user_driver_license)
WHERE `user_id`=?
',
[
- (bool)$user_driver_license['has_car'],
- (bool)$user_driver_license['has_license_car'],
- (bool)$user_driver_license['has_license_3_5t_transporter'],
- (bool)$user_driver_license['has_license_7_5t_truck'],
- (bool)$user_driver_license['has_license_12_5t_truck'],
- (bool)$user_driver_license['has_license_forklift'],
+ (int)$user_driver_license['has_car'],
+ (int)$user_driver_license['has_license_car'],
+ (int)$user_driver_license['has_license_3_5t_transporter'],
+ (int)$user_driver_license['has_license_7_5t_truck'],
+ (int)$user_driver_license['has_license_12_5t_truck'],
+ (int)$user_driver_license['has_license_forklift'],
$user_driver_license['user_id'],
]
);
diff --git a/includes/model/User_model.php b/includes/model/User_model.php
index 0ed602e0..26eb42c4 100644
--- a/includes/model/User_model.php
+++ b/includes/model/User_model.php
@@ -60,13 +60,13 @@ function User_update($user)
$user['DECT'],
$user['Handy'],
$user['email'],
- (bool)$user['email_shiftinfo'],
- (bool)$user['email_by_human_allowed'],
+ (int)$user['email_shiftinfo'],
+ (int)$user['email_by_human_allowed'],
$user['jabber'],
$user['Size'],
$user['Gekommen'],
$user['Aktiv'],
- (bool)$user['force_active'],
+ (int)$user['force_active'],
$user['Tshirt'],
$user['color'],
$user['Sprache'],