summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-07-28 19:44:54 +0200
committermsquare <msquare@notrademark.de>2017-07-28 19:44:54 +0200
commit5cffcd7fdf33067c2ecff6b4995b2ebf12b9b5e2 (patch)
treeb79fc9ed557a7d3a75e1741c9a529174b2ce933e /includes
parent4effb7e59f1bba13230060481eb126548b5442ca (diff)
fix angeltype edit and display bugs
Diffstat (limited to 'includes')
-rw-r--r--includes/controller/angeltypes_controller.php2
-rw-r--r--includes/model/User_model.php1
-rw-r--r--includes/view/AngelTypes_view.php1
3 files changed, 2 insertions, 2 deletions
diff --git a/includes/controller/angeltypes_controller.php b/includes/controller/angeltypes_controller.php
index 346a4d73..58fadd5c 100644
--- a/includes/controller/angeltypes_controller.php
+++ b/includes/controller/angeltypes_controller.php
@@ -127,7 +127,7 @@ function angeltype_edit_controller()
if (!$supporter_mode) {
if ($request->has('name')) {
- $result = AngelType_validate_name($request->get('name'), $angeltype);
+ $result = AngelType_validate_name($request->input('name'), $angeltype);
$angeltype['name'] = $result->getValue();
if (!$result->isValid()) {
$valid = false;
diff --git a/includes/model/User_model.php b/includes/model/User_model.php
index b08569d0..f86d5bf6 100644
--- a/includes/model/User_model.php
+++ b/includes/model/User_model.php
@@ -246,6 +246,7 @@ function Users_by_angeltype($angeltype)
`UserAngelTypes`.`id` AS `user_angeltype_id`,
`UserAngelTypes`.`confirm_user_id`,
`UserAngelTypes`.`supporter`,
+ (`UserDriverLicenses`.`user_id` IS NOT NULL) as `wants_to_drive`,
`UserDriverLicenses`.*
FROM `User`
JOIN `UserAngelTypes` ON `User`.`UID`=`UserAngelTypes`.`user_id`
diff --git a/includes/view/AngelTypes_view.php b/includes/view/AngelTypes_view.php
index f74b0eb1..37b4fb2c 100644
--- a/includes/view/AngelTypes_view.php
+++ b/includes/view/AngelTypes_view.php
@@ -180,7 +180,6 @@ function AngelType_view_members($angeltype, $members, $admin_user_angeltypes, $a
$members_unconfirmed = [];
foreach ($members as $member) {
$member['Nick'] = User_Nick_render($member);
-
if ($angeltype['requires_driver_license']) {
$member['wants_to_drive'] = glyph_bool($member['wants_to_drive']);
$member['has_car'] = glyph_bool($member['has_car']);