Merge branch 'noc0lour:fix_setup_bugs', closes #335

This commit is contained in:
Igor Scheller 2017-09-25 19:51:45 +02:00
commit 4817658862
4 changed files with 7 additions and 5 deletions

View File

@ -205,7 +205,7 @@ DROP TABLE IF EXISTS `NewsComments`;
CREATE TABLE `NewsComments` ( CREATE TABLE `NewsComments` (
`ID` bigint(11) NOT NULL, `ID` bigint(11) NOT NULL,
`Refid` int(11) NOT NULL DEFAULT '0', `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, `Text` text NOT NULL,
`UID` int(11) NOT NULL DEFAULT '0' `UID` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@ -395,7 +395,7 @@ CREATE TABLE `User` (
`Sprache` char(64) NOT NULL, `Sprache` char(64) NOT NULL,
`Menu` char(1) NOT NULL DEFAULT 'L', `Menu` char(1) NOT NULL DEFAULT 'L',
`lastLogIn` int(11) NOT NULL, `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, `Art` varchar(30) DEFAULT NULL,
`kommentar` text, `kommentar` text,
`Hometown` varchar(255) NOT NULL DEFAULT '', `Hometown` varchar(255) NOT NULL DEFAULT '',

View File

@ -481,9 +481,10 @@ function Shift_create($shift)
`URL`, `URL`,
`PSID`, `PSID`,
`created_by_user_id`, `created_by_user_id`,
`edited_at_timestamp`,
`created_at_timestamp` `created_at_timestamp`
) )
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
', ',
[ [
$shift['shifttype_id'], $shift['shifttype_id'],
@ -495,6 +496,7 @@ function Shift_create($shift)
$shift['PSID'], $shift['PSID'],
$user['UID'], $user['UID'],
time(), time(),
time(),
] ]
); );

View File

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

View File

@ -109,7 +109,7 @@ function load_days()
$days = DB::select(' $days = DB::select('
SELECT DISTINCT DATE(FROM_UNIXTIME(`start`)) AS `id`, DATE(FROM_UNIXTIME(`start`)) AS `name` SELECT DISTINCT DATE(FROM_UNIXTIME(`start`)) AS `id`, DATE(FROM_UNIXTIME(`start`)) AS `name`
FROM `Shifts` FROM `Shifts`
ORDER BY `start` ORDER BY `id`, `name`
'); ');
$days = array_map('array_shift', $days); $days = array_map('array_shift', $days);