if (!count(DB::select('SELECT `id`, `name` FROM `AngelTypes` WHERE `restricted` = 0'))) {
if (!count(DB::select('SELECT `id`, `name` FROM `AngelTypes` WHERE `restricted` = 0'))) {
error(__('The administration has not configured any angeltypes yet - or you are not subscribed to any angeltype.'));
error(__('The administration has not configured any angeltypes yet - or you are not subscribed to any angeltype.'));
@ -155,7 +155,7 @@ function load_types()
ORDER BY `AngelTypes`.`name`
ORDER BY `AngelTypes`.`name`
',
',
[
[
$user['UID'],
$user->id,
]
]
);
);
if (empty($types)) {
if (empty($types)) {
@ -284,13 +284,13 @@ function view_user_shifts()
*/
*/
function ical_hint()
function ical_hint()
{
{
global $user;
$user = Auth()->user();
return heading(__('iCal export'), 2)
return heading(__('iCal export'), 2)
. '<p>' . sprintf(
. '<p>' . sprintf(
__('Export your own shifts. <ahref="%s">iCal format</a> or <ahref="%s">JSON format</a> available (please keep secret, otherwise <ahref="%s">reset the api key</a>).'),
__('Export your own shifts. <ahref="%s">iCal format</a> or <ahref="%s">JSON format</a> available (please keep secret, otherwise <ahref="%s">reset the api key</a>).'),