diff --git a/db/install.sql b/db/install.sql index 0222dc08..3c3e41e6 100644 --- a/db/install.sql +++ b/db/install.sql @@ -205,7 +205,7 @@ DROP TABLE IF EXISTS `NewsComments`; CREATE TABLE `NewsComments` ( `ID` bigint(11) NOT NULL, `Refid` int(11) NOT NULL DEFAULT '0', - `Datum` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `Datum` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', `Text` text NOT NULL, `UID` int(11) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -395,7 +395,7 @@ CREATE TABLE `User` ( `Sprache` char(64) NOT NULL, `Menu` char(1) NOT NULL DEFAULT 'L', `lastLogIn` int(11) NOT NULL, - `CreateDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `CreateDate` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', `Art` varchar(30) DEFAULT NULL, `kommentar` text, `Hometown` varchar(255) NOT NULL DEFAULT '', 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);