summaryrefslogtreecommitdiffstats
path: root/apps/calendar/index.php
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-08-26 17:30:07 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-08-26 17:30:07 +0200
commit72e9a2ce57ee88503db83614cec5ccda71f0b58e (patch)
tree8bc301ca22d9ca08ea54426bcb61f62bd1c1cb75 /apps/calendar/index.php
parent32bad688bdb4fea55eba9d4255fc55f1c60a0aca (diff)
downloadnextcloud-server-72e9a2ce57ee88503db83614cec5ccda71f0b58e.tar.gz
nextcloud-server-72e9a2ce57ee88503db83614cec5ccda71f0b58e.zip
moved to apps repository
Diffstat (limited to 'apps/calendar/index.php')
-rw-r--r--apps/calendar/index.php71
1 files changed, 0 insertions, 71 deletions
diff --git a/apps/calendar/index.php b/apps/calendar/index.php
deleted file mode 100644
index a8ad4ab3356..00000000000
--- a/apps/calendar/index.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-/**
- * Copyright (c) 2011 Georg Ehrke <ownclouddev at georgswebsite dot de>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-OCP\User::checkLoggedIn();
-OCP\App::checkAppEnabled('calendar');
-
-// Create default calendar ...
-$calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser(), false);
-if( count($calendars) == 0){
- OC_Calendar_Calendar::addCalendar(OCP\USER::getUser(),'Default calendar');
- $calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser(), true);
-}
-
-$eventSources = array();
-foreach($calendars as $calendar){
- if($calendar['active'] == 1) {
- $eventSources[] = OC_Calendar_Calendar::getEventSourceInfo($calendar);
- }
-}
-
-$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();
-
-//Fix currentview for fullcalendar
-if(OCP\Config::getUserValue(OCP\USER::getUser(), 'calendar', 'currentview', 'month') == "oneweekview"){
- OCP\Config::setUserValue(OCP\USER::getUser(), "calendar", "currentview", "agendaWeek");
-}
-if(OCP\Config::getUserValue(OCP\USER::getUser(), 'calendar', 'currentview', 'month') == "onemonthview"){
- OCP\Config::setUserValue(OCP\USER::getUser(), "calendar", "currentview", "month");
-}
-if(OCP\Config::getUserValue(OCP\USER::getUser(), 'calendar', 'currentview', 'month') == "listview"){
- OCP\Config::setUserValue(OCP\USER::getUser(), "calendar", "currentview", "list");
-}
-
-OCP\Util::addscript('3rdparty/fullcalendar', 'fullcalendar');
-OCP\Util::addStyle('3rdparty/fullcalendar', 'fullcalendar');
-OCP\Util::addscript('3rdparty/timepicker', 'jquery.ui.timepicker');
-OCP\Util::addStyle('3rdparty/timepicker', 'jquery.ui.timepicker');
-if(OCP\Config::getUserValue(OCP\USER::getUser(), "calendar", "timezone") == null || OCP\Config::getUserValue(OCP\USER::getUser(), 'calendar', 'timezonedetection') == 'true'){
- OCP\Util::addscript('calendar', 'geo');
-}
-OCP\Util::addscript('calendar', 'calendar');
-OCP\Util::addStyle('calendar', 'style');
-OCP\Util::addscript('', 'jquery.multiselect');
-OCP\Util::addStyle('', 'jquery.multiselect');
-OCP\Util::addscript('contacts','jquery.multi-autocomplete');
-OCP\Util::addscript('','oc-vcategories');
-OCP\App::setActiveNavigationEntry('calendar_index');
-$tmpl = new OCP\Template('calendar', 'calendar', 'user');
-$tmpl->assign('eventSources', $eventSources,false);
-$tmpl->assign('categories', $categories);
-if(array_key_exists('showevent', $_GET)){
- $tmpl->assign('showevent', $_GET['showevent'], false);
-}
-$tmpl->printPage();