diff --git a/index.php b/index.php index 4b871195..cbfe0027 100644 --- a/index.php +++ b/index.php @@ -24,8 +24,17 @@ foreach($calendars as $calendar){ } } -$eventSources[] = array('url' => '?app=calendar&getfile=ajax/events.php?calendar_id=shared_rw', 'backgroundColor' => '#1D2D44', 'borderColor' => '#888', 'textColor' => 'white', 'editable'=>'true'); -$eventSources[] = array('url' => '?app=calendar&getfile=ajax/events.php?calendar_id=shared_r', 'backgroundColor' => '#1D2D44', 'borderColor' => '#888', 'textColor' => 'white', 'editable' => 'false'); +$events_baseURL = OCP\Util::linkTo('calendar', 'ajax/events.php'); +$eventSources[] = array('url' => $events_baseURL.'?calendar_id=shared_rw', + 'backgroundColor' => '#1D2D44', + 'borderColor' => '#888', + 'textColor' => 'white', + 'editable'=>'true'); +$eventSources[] = array('url' => $events_baseURL.'?calendar_id=shared_r', + 'backgroundColor' => '#1D2D44', + 'borderColor' => '#888', + 'textColor' => 'white', + 'editable' => 'false'); OCP\Util::emitHook('OC_Calendar', 'getSources', array('sources' => &$eventSources)); $categories = OC_Calendar_App::getCategoryOptions(); diff --git a/templates/part.choosecalendar.rowfields.php b/templates/part.choosecalendar.rowfields.php index 4492ce73..d29113c9 100644 --- a/templates/part.choosecalendar.rowfields.php +++ b/templates/part.choosecalendar.rowfields.php @@ -11,7 +11,7 @@