Fixed formatting

This commit is contained in:
Igor Scheller 2021-05-11 21:50:54 +02:00
parent 34b01fd37d
commit edcc1f481d
2 changed files with 6 additions and 4 deletions

View File

@ -238,11 +238,13 @@ function UserAngelType_by_User_and_AngelType($userId, $angeltype)
* Get an UserAngelTypes by user
*
* @param int $userId
* @param bool $onlyConfirmed
* @return array[]|null
*/
function UserAngelTypes_by_User($userId, $onlyConfirmed=false)
{
return DB::select('
return DB::select(
'
SELECT *
FROM `UserAngelTypes`
' . ($onlyConfirmed ? 'LEFT JOIN AngelTypes AS a ON a.id=UserAngelTypes.angeltype_id' : '') . '

View File

@ -195,7 +195,7 @@ function view_user_shifts()
$rooms = load_rooms();
$types = load_types();
$ownTypes = [];
foreach (UserAngelTypes_by_User($user->id, FALSE) as $type) {
foreach (UserAngelTypes_by_User($user->id, true) as $type) {
$ownTypes[] = (int)$type['angeltype_id'];
}