diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-06-13 22:06:22 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-06-13 22:07:23 +0200 |
commit | 6bd80d6457177a47cfb5f98d9bcb224556ed12a1 (patch) | |
tree | dc35ef3250ef5449ff81b9ab490469ce81d2b235 /apps/calendar/lib | |
parent | 12b34d2dda6569f0f06ead29488c19ec8b9a5a8c (diff) | |
download | nextcloud-server-6bd80d6457177a47cfb5f98d9bcb224556ed12a1.tar.gz nextcloud-server-6bd80d6457177a47cfb5f98d9bcb224556ed12a1.zip |
show username of the body who shares in the summary
Diffstat (limited to 'apps/calendar/lib')
-rw-r--r-- | apps/calendar/lib/app.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/apps/calendar/lib/app.php b/apps/calendar/lib/app.php index ff7ad1cb937..e04f2ed0cdf 100644 --- a/apps/calendar/lib/app.php +++ b/apps/calendar/lib/app.php @@ -331,26 +331,29 @@ class OC_Calendar_App{ */ public static function getrequestedEvents($calendarid, $start, $end){ $events = array(); - if($calendarid == 'shared_rw' || $_GET['calendar_id'] == 'shared_r'){ + if($calendarid == 'shared_rw' || $calendarid == 'shared_r'){ $calendars = OC_Calendar_Share::allSharedwithuser(OCP\USER::getUser(), OC_Calendar_Share::CALENDAR, 1, ($_GET['calendar_id'] == 'shared_rw')?'rw':'r'); foreach($calendars as $calendar){ $calendarevents = OC_Calendar_Object::allInPeriod($calendar['calendarid'], $start, $end); + foreach($calendarevents as $event){ + $event['summary'] .= ' (' . self::$l10n->t('by') . ' ' . OC_Calendar_Object::getowner($event['id']) . ')'; + } $events = array_merge($events, $calendarevents); } $singleevents = OC_Calendar_Share::allSharedwithuser(OCP\USER::getUser(), OC_Calendar_Share::EVENT, 1, ($_GET['calendar_id'] == 'shared_rw')?'rw':'r'); foreach($singleevents as $singleevent){ $event = OC_Calendar_Object::find($singleevent['eventid']); + $event['summary'] .= ' (' . self::$l10n->t('by') . ' ' . OC_Calendar_Object::getowner($event['id']) . ')'; $events[] = $event; } }else{ - $calendar_id = $_GET['calendar_id']; - if (is_numeric($calendar_id)) { - $calendar = self::getCalendar($calendar_id); + if (is_numeric($calendarid)) { + $calendar = self::getCalendar($calendarid); OCP\Response::enableCaching(0); OCP\Response::setETagHeader($calendar['ctag']); - $events = OC_Calendar_Object::allInPeriod($calendar_id, $start, $end); + $events = OC_Calendar_Object::allInPeriod($calendarid, $start, $end); } else { - OCP\Util::emitHook('OC_Calendar', 'getEvents', array('calendar_id' => $calendar_id, 'events' => &$events)); + OCP\Util::emitHook('OC_Calendar', 'getEvents', array('calendar_id' => $calendarid, 'events' => &$events)); } } return $events; |