From dc6fb49f44c12e2bc354d7355d5cd903017568e9 Mon Sep 17 00:00:00 2001 From: Andrej Rode Date: Wed, 16 Aug 2017 00:19:16 +0200 Subject: fix only_full_group_by mysql default behaviour --- includes/model/UserAngelTypes_model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/model/UserAngelTypes_model.php b/includes/model/UserAngelTypes_model.php index 11366cdf..410a292f 100644 --- a/includes/model/UserAngelTypes_model.php +++ b/includes/model/UserAngelTypes_model.php @@ -59,7 +59,7 @@ function User_unconfirmed_AngelTypes($user) { AND `UserAngelTypes`.`supporter`=TRUE AND `AngelTypes`.`restricted`=TRUE AND `UnconfirmedMembers`.`confirm_user_id` IS NULL - GROUP BY `UserAngelTypes`.`angeltype_id` + GROUP BY `UserAngelTypes`.`angeltype_id`, `UserAngelTypes`.`id` ORDER BY `AngelTypes`.`name`"); if ($result === false) { engelsystem_error("Unable to load user angeltypes."); -- cgit v1.2.3-54-g00ecf From 5f305121a4fb6a21bedcd82d845909aed38cec0c Mon Sep 17 00:00:00 2001 From: Andrej Rode Date: Wed, 16 Aug 2017 00:45:56 +0200 Subject: fix order by not in select clause for >mysql-5.7 --- includes/pages/user_shifts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php index c990ee4a..30f129c7 100644 --- a/includes/pages/user_shifts.php +++ b/includes/pages/user_shifts.php @@ -89,7 +89,7 @@ function load_days() { $days = sql_select_single_col(" SELECT DISTINCT DATE(FROM_UNIXTIME(`start`)) AS `id`, DATE(FROM_UNIXTIME(`start`)) AS `name` FROM `Shifts` - ORDER BY `start`"); + ORDER BY `id`, `name`"); if (count($days) == 0) { error(_("The administration has not configured any shifts yet.")); redirect('?'); -- cgit v1.2.3-54-g00ecf From eeae07e625890cee9a3cb90ee87e07530b7bf192 Mon Sep 17 00:00:00 2001 From: Andrej Rode Date: Wed, 16 Aug 2017 01:31:53 +0200 Subject: add edited_at_timestamp to shift creation to fix mysql error --- includes/model/Shifts_model.php | 1 + 1 file changed, 1 insertion(+) (limited to 'includes') diff --git a/includes/model/Shifts_model.php b/includes/model/Shifts_model.php index 29156423..baaf4c28 100644 --- a/includes/model/Shifts_model.php +++ b/includes/model/Shifts_model.php @@ -334,6 +334,7 @@ function Shift_create($shift) { `URL`=" . sql_null($shift['URL']) . ", `PSID`=" . sql_null($shift['PSID']) . ", `created_by_user_id`='" . sql_escape($user['UID']) . "', + `edited_at_timestamp`=" . time() .", `created_at_timestamp`=" . time()); if ($result === false) { return false; -- cgit v1.2.3-54-g00ecf