forked from extern/egroupware
* Calendar: warning if user tries to move horizont further then default 1000 days and NOT start moving horizont, to allow adding events after the horizont
This commit is contained in:
parent
f65fd9129f
commit
5dc47a9044
@ -191,6 +191,13 @@ class calendar_bo
|
||||
*/
|
||||
public $calview_no_consolidate = 5;
|
||||
|
||||
/**
|
||||
* Warnings to show in regular UI
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
var $warnings = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@ -626,13 +633,13 @@ class calendar_bo
|
||||
{
|
||||
if ((int) $this->debug >= 2 || $this->debug == 'check_move_horizont')
|
||||
{
|
||||
$this->debug_message('calendar_bo::check_move_horizont(%1) horizont=%2',true,$new_horizont,$this->config['horizont']);
|
||||
$this->debug_message('calendar_bo::check_move_horizont(%1) horizont=%2',true,$new_horizont,(int)$this->config['horizont']);
|
||||
}
|
||||
$new_horizont = $this->date2ts($new_horizont,true); // now we are in server-time, where this function operates
|
||||
|
||||
if ($new_horizont <= $this->config['horizont']) // no move necessary
|
||||
{
|
||||
if ($this->debug == 'check_move_horizont') $this->debug_message('calendar_bo::check_move_horizont(%1) horizont=%2 is bigger ==> nothing to do',true,$new_horizont,$this->config['horizont']);
|
||||
if ($this->debug == 'check_move_horizont') $this->debug_message('calendar_bo::check_move_horizont(%1) horizont=%2 is bigger ==> nothing to do',true,$new_horizont,(int)$this->config['horizont']);
|
||||
return;
|
||||
}
|
||||
if (!empty($GLOBALS['egw_info']['server']['calendar_horizont']))
|
||||
@ -642,8 +649,9 @@ class calendar_bo
|
||||
if (empty($maxdays)) $maxdays = 1000; // old default
|
||||
if ($new_horizont > time()+$maxdays*DAY_s) // some user tries to "look" more then the maximum number of days in the future
|
||||
{
|
||||
if ($this->debug == 'check_move_horizont') $this->debug_message('calendar_bo::check_move_horizont(%1) horizont=%2 new horizont more then 1000 days from now --> ignoring it',true,$new_horizont,$this->config['horizont']);
|
||||
$new_horizont = time()+$maxdays*DAY_s;
|
||||
if ($this->debug == 'check_move_horizont') $this->debug_message('calendar_bo::check_move_horizont(%1) horizont=%2 new horizont more then %3 days from now --> ignoring it',true,$new_horizont,(int)$this->config['horizont'],$maxdays);
|
||||
$this->warnings['horizont'] = lang('Requested date %1 outside allowed range of %2 days: recurring events obmitted!', egw_time::to($new_horizont,true), $maxdays);
|
||||
return;
|
||||
}
|
||||
if ($new_horizont < time()+31*DAY_s)
|
||||
{
|
||||
@ -655,6 +663,7 @@ class calendar_bo
|
||||
// create further recurrences for all recurring and not yet (at the old horizont) ended events
|
||||
if (($recuring = $this->so->unfinished_recuring($old_horizont)))
|
||||
{
|
||||
@set_time_limit(0); // disable time-limit, in case it takes longer to calculate the recurrences
|
||||
foreach($this->read(array_keys($recuring)) as $cal_id => $event)
|
||||
{
|
||||
if ($this->debug == 'check_move_horizont')
|
||||
@ -666,10 +675,9 @@ class calendar_bo
|
||||
}
|
||||
}
|
||||
// update the horizont
|
||||
$config = CreateObject('phpgwapi.config','calendar');
|
||||
$config->save_value('horizont',$this->config['horizont'],'calendar');
|
||||
config::save_value('horizont',$this->config['horizont'],'calendar');
|
||||
|
||||
if ($this->debug == 'check_move_horizont') $this->debug_message('calendar_bo::check_move_horizont(%1) new horizont=%2, exiting',true,$new_horizont,$this->config['horizont']);
|
||||
if ($this->debug == 'check_move_horizont') $this->debug_message('calendar_bo::check_move_horizont(%1) new horizont=%2, exiting',true,$new_horizont,(int)$this->config['horizont']);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -926,7 +934,8 @@ class calendar_bo
|
||||
if (!$event['recur_enddate'] || $this->date2ts($event['recur_enddate']) > $this->date2ts($end))
|
||||
{
|
||||
//echo "<p>recur_enddate={$event['recur_enddate']}=".egw_time::to($event['recur_enddate'])." > end=$end=".egw_time::to($end)." --> using end instead of recur_enddate</p>\n";
|
||||
$event['recur_enddate'] = $end;
|
||||
// insert at least the event itself, if it's behind the horizont
|
||||
$event['recur_enddate'] = $this->date2ts($end) < $this->date2ts($event['end']) ? $event['end'] : $end;
|
||||
}
|
||||
// loop over all recurrences and insert them, if they are after $start
|
||||
$rrule = calendar_rrule::event2rrule($event, true); // true = we operate in usertime, like the rest of calendar_bo
|
||||
|
@ -202,17 +202,17 @@ class calendar_ui
|
||||
{
|
||||
return $msg;
|
||||
}
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
common::egw_header();
|
||||
if ($GLOBALS['egw_info']['flags']['nonavbar']) parse_navbar();
|
||||
|
||||
echo $msg;
|
||||
|
||||
$GLOBALS['egw']->common->egw_footer();
|
||||
$GLOBALS['egw']->common->egw_exit();
|
||||
common::egw_footer();
|
||||
common::egw_exit();
|
||||
}
|
||||
if (count($no_access_group))
|
||||
{
|
||||
$this->group_warning = lang('Groupmember(s) %1 not included, because you have no access.',implode(', ',$no_access_group));
|
||||
$this->bo->warnings['groupmembers'] = lang('Groupmember(s) %1 not included, because you have no access.',implode(', ',$no_access_group));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -223,11 +223,11 @@ class calendar_ui
|
||||
function do_header()
|
||||
{
|
||||
$GLOBALS['egw_info']['flags']['include_xajax'] = true;
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
common::egw_header();
|
||||
|
||||
if ($_GET['msg']) echo '<p class="redItalic" align="center">'.html::htmlspecialchars($_GET['msg'])."</p>\n";
|
||||
|
||||
if ($this->group_warning) echo '<p class="redItalic" align="center">'.$this->group_warning."</p>\n";
|
||||
if ($this->bo->warnings) echo '<p class="redItalic" align="center">'.implode('<br />',$this->bo->warnings)."</p>\n";
|
||||
}
|
||||
|
||||
/**
|
||||
@ -748,6 +748,7 @@ class calendar_ui
|
||||
'hideprivate' => array(lang('Hide private infos'),lang('Show all events, as if they were private')),
|
||||
'showonlypublic' => array(lang('Hide private events'),lang('Show only events flagged as public, (not checked as private)')),
|
||||
'no-enum-groups' => array(lang('only group-events'),lang('Do not include events of group members')),
|
||||
'not-unknown' => array(lang('No meeting requests'),lang('Show all status, but unknown')),
|
||||
) as $value => $label)
|
||||
{
|
||||
list($label,$title) = $label;
|
||||
@ -756,7 +757,8 @@ class calendar_ui
|
||||
|
||||
// Add in deleted for admins
|
||||
$config = config::read('phpgwapi');
|
||||
if($config['calendar_delete_history']) {
|
||||
if($config['calendar_delete_history'])
|
||||
{
|
||||
$options .= '<option value="deleted"'.($this->filter == 'deleted' ? ' selected="selected"' : '').' title="'.lang('Show events that have been deleted').'">'.lang('Deleted').'</options>'."\n";
|
||||
}
|
||||
|
||||
@ -808,8 +810,8 @@ function load_cal(url,id) {
|
||||
}
|
||||
|
||||
// Merge print
|
||||
if ($GLOBALS['egw_info']['user']['preferences']['calendar']['document_dir'])
|
||||
{
|
||||
if ($GLOBALS['egw_info']['user']['preferences']['calendar']['document_dir'])
|
||||
{
|
||||
$options = '';
|
||||
$documents = calendar_merge::get_documents($GLOBALS['egw_info']['user']['preferences']['calendar']['document_dir']);
|
||||
|
||||
@ -817,7 +819,7 @@ function load_cal(url,id) {
|
||||
$spreadsheets = importexport_admin_prefs_sidebox_hooks::get_spreadsheet_list('calendar');
|
||||
foreach($spreadsheets as $file_info)
|
||||
{
|
||||
if($key = array_search($file_info['name'], $documents))
|
||||
if($key = array_search($file_info['name'], $documents))
|
||||
{
|
||||
unset($documents[$key]);
|
||||
}
|
||||
@ -890,7 +892,7 @@ function load_cal(url,id) {
|
||||
if(!$timespan)
|
||||
{
|
||||
$timespan = array(array(
|
||||
'start' => is_array($this->first) ? $this->bo->date2ts($this->first) : $this->first,
|
||||
'start' => is_array($this->first) ? $this->bo->date2ts($this->first) : $this->first,
|
||||
'end' => is_array($this->last) ? $this->bo->date2ts($this->last) : $this->last
|
||||
));
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ calendar fields: calendar de Kalender Felder:
|
||||
calendar holiday management admin de Feiertage verwalten
|
||||
calendar ical export calendar de Kalender iCal Export
|
||||
calendar ical import calendar de Kalender iCal Import
|
||||
calendar id calendar de Kalender ID
|
||||
calendar menu calendar de Kalender Menü
|
||||
calendar preferences calendar de Kalender Einstellungen
|
||||
calendar settings admin de Kalender Einstellungen
|
||||
@ -189,6 +190,7 @@ exception created - you can now edit or delete it calendar de Ausnahme erzeugt -
|
||||
exceptions calendar de Ausnahmen
|
||||
execute a further action for this entry calendar de Führt einen weiteren Befehl für diesen Eintrag aus
|
||||
existing links calendar de Bestehende Verknüpfungen
|
||||
exists calendar de existiert
|
||||
export calendar de Exportieren
|
||||
export definitition to use for nextmatch export calendar de Export Profil der Listenansicht (Disketten Symbol)
|
||||
exports events from your calendar in ical format. calendar de Exportiert Termine im iCal Format
|
||||
@ -311,6 +313,7 @@ no automatic purging admin de Keine automatische Bereinigung alter Termine
|
||||
no events found calendar de Keine Termine gefunden
|
||||
no filter calendar de Kein Filter
|
||||
no matches found calendar de Keine Treffer gefunden
|
||||
no meeting requests calendar de Keine Einladungen
|
||||
no owner selected calendar de Kein Besitzer ausgewählt
|
||||
no recurrence calendar de Keine Wiederholung
|
||||
no response calendar de Keine Antwort
|
||||
@ -382,6 +385,7 @@ repetition calendar de Wiederholung
|
||||
repetitiondetails (or empty) calendar de Details der Wiederholung (oder leer)
|
||||
replacements for inserting events into documents calendar de Platzhalter für das Einfügen von Terminen in Dokumente
|
||||
requested calendar de Erforderlich
|
||||
requested date %1 outside allowed range of %2 days: recurring events obmitted! calendar de Gewünschtes Datum %1 außerhalb des erlauben Bereiches von %2 Tagen: wiederholdende Termine ausgelassen!
|
||||
requested meeting is in the past! calendar de Termin, zu dem eingeladen wird, ist in der Vergangenheit!
|
||||
require an acl grant to invite other users and groups admin de Freigabe um andere Benutzer oder Gruppen einzuladen erforderlich
|
||||
reset calendar de Zurücksetzen
|
||||
@ -425,6 +429,7 @@ show a calendar title calendar de Soll der Kalender Titel angezeigt werden?
|
||||
show all events, as if they were private calendar de Zeige alle Termine, so als wären sie privat
|
||||
show all status incl. rejected events calendar de Zeige alle Status einschl. abgesagte Termine
|
||||
show all status, but rejected calendar de Zeige alle Status außer abgesagte Termine
|
||||
show all status, but unknown calendar de Zeige alle Status außer Einladungen
|
||||
show also events just owned by selected user calendar de Zeige zusätzlich Termine die dem ausgewählten Benutzer nur gehören
|
||||
show birthdays from addressbook admin de Zeige Geburtstage vom Adressbuch
|
||||
show default view on main screen calendar de Kalenderansicht auf der Startseite anzeigen
|
||||
|
@ -313,6 +313,7 @@ no automatic purging admin en No automatic purging
|
||||
no events found calendar en No events found.
|
||||
no filter calendar en No filter
|
||||
no matches found calendar en No matches found.
|
||||
no meeting requests calendar en No meeting requests
|
||||
no owner selected calendar en No owner selected.
|
||||
no recurrence calendar en No recurrence.
|
||||
no response calendar en No response.
|
||||
@ -384,6 +385,7 @@ repetition calendar en Repetition
|
||||
repetitiondetails (or empty) calendar en Repetition details (or empty)
|
||||
replacements for inserting events into documents calendar en Replacements for inserting events into documents
|
||||
requested calendar en Requested
|
||||
requested date %1 outside allowed range of %2 days: recurring events obmitted! calendar en Requested date %1 outside allowed range of %2 days: recurring events obmitted!
|
||||
requested meeting is in the past! calendar en Requested meeting is in the past!
|
||||
require an acl grant to invite other users and groups admin en Require an ACL grant to invite other users and groups
|
||||
reset calendar en Reset
|
||||
@ -418,7 +420,6 @@ setting lock time calender admin en Setting data lock time for Calendar (default
|
||||
shall the date parameter be accepted (e.g. from calendar module)? calendar en Shall the date parameter be accepted, e.g. from calendar module?
|
||||
should new events created as private by default ? calendar en Should new events be created as private by default ?
|
||||
should not loged in persons be able to see your freebusy information? you can set an extra password, different from your normal password, to protect this informations. the freebusy information is in ical format and only include the times when you are busy. it does not include the event-name, description or locations. the url to your freebusy information is calendar en Should not logged in persons be able to see your FreeBusy information? You can set an extra password, different from your normal password, to protect this information. The FreeBusy information is in iCal format and only include the times when you are busy. It does not include the event names, descriptions or locations. The URL to your FreeBusy information is
|
||||
should not loged in persons be able to see your freebusy information? you can set an extra password, different from your normal password, to protect this informations. the freebusy information is in ical format and only include the times when you are busy. it does not include the event-name, description or locations. the url to your freebusy information is* <a href="https://translation.stylite.de/egroupware/calendar/freebusy.php/?user=mkk" target="_blank">https://translation.stylite.de/egroupware/calendar/freebusy.php/?user=mkk</a> calendar en Should not logged in persons be able to see your FreeBusy information? You can set an extra password, different from your normal password, to protect this information. The FreeBusy information is in iCal format and only include the times when you are busy. It does not include the event names, descriptions or locations. The URL to your FreeBusy information is* <a href="https://translation.stylite.de/egroupware/calendar/freebusy.php/?user=mkk" target="_blank">https://translation.stylite.de/egroupware/calendar/freebusy.php/?user=mkk</a>
|
||||
should the grid be shown in the calendar calendar en Should the grid be shown in the calendar
|
||||
should the number of weeks be shown on top of the calendar calendar en Should the number of weeks be shown on top of the calendar
|
||||
should the number of weeks be shown on top of the calendar (only if offset = 0) calendar en Should the number of weeks be shown on top of the calendar (only if offset = 0)
|
||||
@ -428,6 +429,7 @@ show a calendar title calendar en Show a calendar title
|
||||
show all events, as if they were private calendar en Show all events, as if they were private
|
||||
show all status incl. rejected events calendar en Show all status incl. rejected events
|
||||
show all status, but rejected calendar en Show all status, but rejected
|
||||
show all status, but unknown calendar en Show all status, but unknown
|
||||
show also events just owned by selected user calendar en Show also events just owned by selected user
|
||||
show birthdays from addressbook admin en Show birthdays from address book
|
||||
show default view on main screen calendar en Show calendar on main screen
|
||||
|
Loading…
Reference in New Issue
Block a user