diff options
Diffstat (limited to 'apps/calendar')
-rw-r--r-- | apps/calendar/appinfo/install.php | 4 | ||||
-rw-r--r-- | apps/calendar/appinfo/remote.php (renamed from apps/calendar/caldav.php) | 5 | ||||
-rwxr-xr-x | apps/calendar/appinfo/update.php | 3 |
3 files changed, 9 insertions, 3 deletions
diff --git a/apps/calendar/appinfo/install.php b/apps/calendar/appinfo/install.php new file mode 100644 index 00000000000..c5a9a72f26f --- /dev/null +++ b/apps/calendar/appinfo/install.php @@ -0,0 +1,4 @@ +<?php +if(!file_exists(OC::$WEBROOT.'/remote/caldav.php')){ + file_put_contents(OC::$WEBROOT.'/remote/caldav.php', file_get_contents(OC::$APPROOT . '/apps/calendar/appinfo/remote.php')); +}
\ No newline at end of file diff --git a/apps/calendar/caldav.php b/apps/calendar/appinfo/remote.php index 7210b25879f..2fbb973d5cb 100644 --- a/apps/calendar/caldav.php +++ b/apps/calendar/appinfo/remote.php @@ -5,10 +5,9 @@ * later. * See the COPYING-README file. */ - // Do not load FS ... $RUNTIME_NOSETUPFS = true; -require_once('../inc.php'); +require_once('../lib/base.php'); OC_Util::checkAppEnabled('calendar'); @@ -25,7 +24,7 @@ $nodes = array( // Fire up server $server = new Sabre_DAV_Server($nodes); -$server->setBaseUri(OC::$APPSWEBROOT.'/apps/calendar/caldav.php'); +$server->setBaseUri(OC::$WEBROOT.'/remote/caldav.php'); // Add plugins $server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud')); $server->addPlugin(new Sabre_CalDAV_Plugin()); diff --git a/apps/calendar/appinfo/update.php b/apps/calendar/appinfo/update.php index 9f52f91392d..78e4f2d8748 100755 --- a/apps/calendar/appinfo/update.php +++ b/apps/calendar/appinfo/update.php @@ -15,3 +15,6 @@ if (version_compare($installedVersion, '0.2.1', '<')) { $r = $stmt->execute(array($color,$id)); } } +if(!file_exists(OC::$WEBROOT.'/remote/caldav.php')){ + file_put_contents(OC::$WEBROOT.'/remote/caldav.php', file_get_contents(OC::$APPROOT . '/apps/calendar/appinfo/remote.php')); +}
\ No newline at end of file |