summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-09-25 19:51:45 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2017-09-25 20:25:00 +0200
commit48176588627133d7967310f007248b0701007214 (patch)
tree5cafa69095c59ce0fd1c8caee7789330389a4e7e /includes
parent449e2cdd00632acff63bb75c5282c3aa2642b59f (diff)
parenteeae07e625890cee9a3cb90ee87e07530b7bf192 (diff)
Merge branch 'noc0lour:fix_setup_bugs', closes #335
Diffstat (limited to 'includes')
-rw-r--r--includes/model/Shifts_model.php4
-rw-r--r--includes/model/UserAngelTypes_model.php2
-rw-r--r--includes/pages/user_shifts.php2
3 files changed, 5 insertions, 3 deletions
diff --git a/includes/model/Shifts_model.php b/includes/model/Shifts_model.php
index 03f8341f..ef02aaab 100644
--- a/includes/model/Shifts_model.php
+++ b/includes/model/Shifts_model.php
@@ -481,9 +481,10 @@ function Shift_create($shift)
`URL`,
`PSID`,
`created_by_user_id`,
+ `edited_at_timestamp`,
`created_at_timestamp`
)
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
',
[
$shift['shifttype_id'],
@@ -495,6 +496,7 @@ function Shift_create($shift)
$shift['PSID'],
$user['UID'],
time(),
+ time(),
]
);
diff --git a/includes/model/UserAngelTypes_model.php b/includes/model/UserAngelTypes_model.php
index 5b0caf98..0c413010 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`
', [$user['UID']]);
}
diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php
index 2bd7688f..24b9251a 100644
--- a/includes/pages/user_shifts.php
+++ b/includes/pages/user_shifts.php
@@ -109,7 +109,7 @@ function load_days()
$days = DB::select('
SELECT DISTINCT DATE(FROM_UNIXTIME(`start`)) AS `id`, DATE(FROM_UNIXTIME(`start`)) AS `name`
FROM `Shifts`
- ORDER BY `start`
+ ORDER BY `id`, `name`
');
$days = array_map('array_shift', $days);