Fix metrics and notifications when sql_mode is only_full_group_by (since MySQL 5.7/8.0)

This commit is contained in:
Igor Scheller 2022-03-20 15:32:44 +01:00
parent fb573fd1d9
commit b345bf4ea7
2 changed files with 3 additions and 3 deletions

View File

@ -60,7 +60,7 @@ function User_unconfirmed_AngelTypes($userId)
AND `UserAngelTypes`.`supporter`=TRUE
AND `AngelTypes`.`restricted`=TRUE
AND `UnconfirmedMembers`.`confirm_user_id` IS NULL
GROUP BY `UserAngelTypes`.`angeltype_id`, `UserAngelTypes`.`id`
GROUP BY `UserAngelTypes`.`angeltype_id`, `UserAngelTypes`.`id`, AngelTypes.name, UserAngelTypes.user_id, UserAngelTypes.confirm_user_id, UserAngelTypes.supporter
ORDER BY `AngelTypes`.`name`
', [$userId]);
}

View File

@ -309,7 +309,7 @@ class Stats
$this->workSecondsQuery($done, $freeloaded),
'UID',
'SUM(end - start)',
'end - start'
'SUM(end - start)'
);
}
@ -364,7 +364,7 @@ class Stats
Worklog::query(),
'user_id',
'SUM(hours * 60 * 60)',
'hours * 60 * 60'
'SUM(hours * 60 * 60)'
);
}