From 560754fdd42434d9430ae70ed70e6a93f427ee7e Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 10 Aug 2018 11:31:06 +0200 Subject: [PATCH] fix wrong time for past alarms and added nicer working for alarm "at start of the event" --- calendar/inc/class.calendar_uiforms.inc.php | 14 +++++++++++--- calendar/lang/egw_de.lang | 1 + calendar/lang/egw_en.lang | 2 ++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 29958b50e1..b248ff68f3 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -5,9 +5,8 @@ * @link http://www.egroupware.org * @package calendar * @author Ralf Becker - * @copyright (c) 2004-16 by RalfBecker-At-outdoor-training.de + * @copyright (c) 2004-18 by RalfBecker-At-outdoor-training.de * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License - * @version $Id$ */ use EGroupware\Api; @@ -1791,7 +1790,16 @@ class calendar_uiforms extends calendar_ui if ($days) $label[] = $days.' '.lang('days'); if ($hours) $label[] = $hours.' '.lang('hours'); if ($minutes) $label[] = $minutes.' '.lang('Minutes'); - $alarm['offset'] = implode(', ',$label) . ' ' . ($after ? lang('after') : lang('before')); + if (!$label) + { + $alarm['offset'] = lang('at start of the event'); + } + else + { + $alarm['offset'] = implode(', ',$label) . ' ' . ($after ? lang('after') : lang('before')); + } + // fix alarm time in case of alread run alarms, where the time will be their keep_time / when they will be cleaned up otherwise + $alarm['time'] = $event['start'] - $alarm['offset']; $content['alarm'][] = $alarm; $readonlys['alarm[delete_alarm]['.$alarm['id'].']'] = !$this->bo->check_perms(Acl::EDIT,$alarm['all'] ? $event : 0,$alarm['owner']); diff --git a/calendar/lang/egw_de.lang b/calendar/lang/egw_de.lang index f5e25724aa..dafc69558d 100644 --- a/calendar/lang/egw_de.lang +++ b/calendar/lang/egw_de.lang @@ -58,6 +58,7 @@ apply the action on the whole query, not only the shown events calendar de Befeh apply the changes calendar de Übernimmt die Änderungen appointment settings calendar de Einstellungen der Terminverwaltung as an alternative you can %1download a mysql dump%2 and import it manually into egw_cal_timezones table. calendar de Als Alternative können Sie auch einen %1MySQL Dump herunterladen%2 und diesen von Hand in die Datenbank Tabelle egw_cal_timezones importieren. +at start of the event calendar de am Beginn des Termins automatically purge old events after admin de Bereinigt bzw. löscht alte Termine automatisch nach back half a month calendar de einen halben Monat zurück back one month calendar de einen Monat zurück diff --git a/calendar/lang/egw_en.lang b/calendar/lang/egw_en.lang index c7029dba82..b2d7e88c2f 100644 --- a/calendar/lang/egw_en.lang +++ b/calendar/lang/egw_en.lang @@ -58,6 +58,7 @@ apply the action on the whole query, not only the shown events calendar en Apply apply the changes calendar en Apply the changes appointment settings calendar en Appointment settings as an alternative you can %1download a mysql dump%2 and import it manually into egw_cal_timezones table. calendar en As an alternative you can %1download a MySQL dump%2 and import it manually into egw_cal_timezones table. +at start of the event calendar en at start of the event automatically purge old events after admin en Automatically purge old events after back half a month calendar en Back half a month back one month calendar en Back one month @@ -155,6 +156,7 @@ delete this series of recurring events calendar en Delete this series of recurri deleted calendar en Deleted. deny resources reservation for private events calendar en Deny resources reservation for private events directory with documents to insert entries calendar en Directory with documents to insert entries +utilities calendar en Utilities uninvited calendar en uninvited. display holidays or birthdays as events in dayview calendar en Display holidays or birthdays as events in dayview display in header calendar en Display in header