summaryrefslogtreecommitdiffstats
path: root/apps/calendar/lib/app.php
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-06-15 11:48:26 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-06-15 11:48:26 +0200
commit4767c705782786f1682ebef1c4d726ac3a4fb5f5 (patch)
tree962a5f91a64b134c281f72975e1a1035b0cecc6a /apps/calendar/lib/app.php
parent22a33b509ff8339393834764a19d8d026177783e (diff)
parent2b228fba3463722ad19ea6ccd150b96772508791 (diff)
downloadnextcloud-server-4767c705782786f1682ebef1c4d726ac3a4fb5f5.tar.gz
nextcloud-server-4767c705782786f1682ebef1c4d726ac3a4fb5f5.zip
fix merge conflicts
Diffstat (limited to 'apps/calendar/lib/app.php')
-rw-r--r--apps/calendar/lib/app.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/calendar/lib/app.php b/apps/calendar/lib/app.php
index 4711bf7a2e3..17c23f4ea32 100644
--- a/apps/calendar/lib/app.php
+++ b/apps/calendar/lib/app.php
@@ -50,10 +50,7 @@ class OC_Calendar_App{
return false;
}
}
- if($calendar === false){
- return false;
- }
- return OC_Calendar_Calendar::find($id);
+ return $calendar;
}
/*
@@ -329,26 +326,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;