From a3570409ace83614f2658cdd5a5be21ace69ab63 Mon Sep 17 00:00:00 2001 From: Patrick Cool Date: Sun, 31 May 2009 21:14:47 +0200 Subject: [PATCH] [svn r21139] 1. bugfix: api_get_cidreq() instead of api_get_cidreq 2. bugfix: viewing the orginal event of a repeated event, then changing the visibility resulted in a display of the full list. Now we stay with the view on this original event 3. bugfix: viewing the original event of a repeated event: the visibility did not match with the actual state and it was not possible to change the visibility state. 4. bugfix: icon could not be found for visibility --- main/calendar/agenda.inc.php | 11 ++++++++--- main/calendar/agenda.php | 11 +++++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/main/calendar/agenda.inc.php b/main/calendar/agenda.inc.php index 1fb68f3ca8..c2b32879af 100644 --- a/main/calendar/agenda.inc.php +++ b/main/calendar/agenda.inc.php @@ -1,4 +1,4 @@ -'; echo ''; - if($is_repeated){echo get_lang('RepeatedEvent'),' ',get_lang('RepeatedEventViewOriginalEvent'),'';} + if($is_repeated){echo get_lang('RepeatedEvent'),' ',get_lang('RepeatedEventViewOriginalEvent'),'';} echo "".Display::return_icon('top.gif', get_lang('Top')).""; echo "

"; } // end while ($myrow=Database::fetch_array($result)) @@ -2415,6 +2415,11 @@ function display_one_agenda_item($agenda_id) if (!$repeat && api_is_allowed_to_edit(false,true)) { // edit $mylink = api_get_self()."?".api_get_cidreq()."&origin=".Security::remove_XSS($_GET['origin'])."&id=".$myrow['id']; + if (!empty($_GET['agenda_id'])) + { + // rather ugly hack because the id parameter is already set above but below we set it again + $mylink .= '&agenda_id='.Security::remove_XSS($_GET['agenda_id']).'&id='.Security::remove_XSS($_GET['agenda_id']); + } echo "", Display::return_icon('edit.gif', get_lang('ModifyCalendarItem')), "", "", @@ -2424,7 +2429,7 @@ function display_one_agenda_item($agenda_id) } else { $image_visibility="invisible"; } - echo '',Display::return_icon($image_visibility, get_lang('Visible')),''; + echo '',Display::return_icon($image_visibility.'.gif', get_lang('Visible')),''; } $mylink = 'ical_export.php?'.api_get_cidreq().'&type=course&id='.$myrow['id']; echo ''.Display::return_icon($export_icon_high, get_lang('ExportiCalConfidential')).' '; diff --git a/main/calendar/agenda.php b/main/calendar/agenda.php index d0f3f06844..1e59a7ae4b 100644 --- a/main/calendar/agenda.php +++ b/main/calendar/agenda.php @@ -1,4 +1,4 @@ -