From 9e83c3f823a545ea91b584d3d7c8a81ebf8c2fb4 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Wed, 16 May 2012 21:05:15 +0200 Subject: [PATCH] add caldav and carddav files in their old place for backward compatibility - add rewriterule for caldav and carddav --- .htaccess | 4 +++- apps/calendar/appinfo/remote.php | 4 ++++ apps/calendar/caldav.php | 6 ++++++ apps/contacts/appinfo/remote.php | 4 ++++ apps/contacts/carddav.php | 6 ++++++ 5 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 apps/calendar/caldav.php create mode 100644 apps/contacts/carddav.php diff --git a/.htaccess b/.htaccess index 79904f8a9da..095a0cc6375 100644 --- a/.htaccess +++ b/.htaccess @@ -13,7 +13,9 @@ RewriteEngine on RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteRule ^.well-known/host-meta /public.php?service=host-meta [QSA,L] RewriteRule ^.well-known/carddav /remote.php/carddav/ [R] -RewriteRule ^.well-known/caldav /remote.php/caldav/ [R] +RewriteRule ^.well-known/caldav /remote.php/caldav/ [R] +RewriteRule ^apps/calendar/caldav.php remote.php/caldav/ [QSA,L] +RewriteRule ^apps/contacts/carddav.php remote.php/carddav/ [QSA,L] RewriteRule ^apps/([^/]*)/(.*\.(css|php))$ index.php?app=$1&getfile=$2 [QSA,L] RewriteRule ^remote/(.*) remote.php [QSA,L] diff --git a/apps/calendar/appinfo/remote.php b/apps/calendar/appinfo/remote.php index 0673c36540f..3bd8737ee97 100644 --- a/apps/calendar/appinfo/remote.php +++ b/apps/calendar/appinfo/remote.php @@ -7,6 +7,10 @@ */ OCP\App::checkAppEnabled('calendar'); +if(substr($_SERVER["REQUEST_URI"],0,strlen(OC::$APPSWEBROOT . '/apps/calendar/caldav.php')) == OC::$APPSWEBROOT . '/apps/calendar/caldav.php'){ + $baseuri = OC::$APPSWEBROOT . '/apps/calendar/caldav.php'; +} + // only need authentication apps $RUNTIME_APPTYPES=array('authentication'); OC_App::loadApps($RUNTIME_APPTYPES); diff --git a/apps/calendar/caldav.php b/apps/calendar/caldav.php new file mode 100644 index 00000000000..7b811d3cdf1 --- /dev/null +++ b/apps/calendar/caldav.php @@ -0,0 +1,6 @@ +