From e88450037a5e4250cb8846a59f3b657b50a985c4 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 1dc558c121..9e9e168129 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 402ded2483..01029eb083 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 aec6725863..3e18019f3a 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 @@ -156,6 +157,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