]> source.dussan.org Git - nextcloud-server.git/commitdiff
add caldav and carddav files in their old place for backward compatibility - add...
authorGeorg Ehrke <dev@georgswebsite.de>
Wed, 16 May 2012 19:05:15 +0000 (21:05 +0200)
committerGeorg Ehrke <dev@georgswebsite.de>
Wed, 16 May 2012 19:05:15 +0000 (21:05 +0200)
.htaccess
apps/calendar/appinfo/remote.php
apps/calendar/caldav.php [new file with mode: 0644]
apps/contacts/appinfo/remote.php
apps/contacts/carddav.php [new file with mode: 0644]

index 79904f8a9dab38ff08b39568f682295794321521..095a0cc6375baff9be13b2a485a873fde15b2015 100644 (file)
--- 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]
 </IfModule>
index 0673c36540faba168f4db6a36cd731f8246f2885..3bd8737ee974831bc6577f83b1bad2640c973215 100644 (file)
@@ -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 (file)
index 0000000..7b811d3
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+if(!file_exists('../../lib/base.php')){
+       die('Please update the path to /lib/base.php in caldav.php or make use of /remote.php/caldav/');
+}
+require_once('../../lib/base.php');
+require_once('appinfo/remote.php');
\ No newline at end of file
index 9a34ecd4a4c66a3ef4347a064d4474da7e858f6d..ef50e4ad39ffe9040a7db755c906d2725202c5fa 100644 (file)
 
 OCP\App::checkAppEnabled('contacts');
 
+if(substr($_SERVER["REQUEST_URI"],0,strlen(OC::$APPSWEBROOT . '/apps/contacts/carddav.php')) == OC::$APPSWEBROOT . '/apps/contacts/carddav.php'){
+       $baseuri = OC::$APPSWEBROOT . '/apps/contacts/carddav.php';
+}
+
 // only need authentication apps
 $RUNTIME_APPTYPES=array('authentication');
 OC_App::loadApps($RUNTIME_APPTYPES);
diff --git a/apps/contacts/carddav.php b/apps/contacts/carddav.php
new file mode 100644 (file)
index 0000000..e0579e6
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+if(!file_exists('../../lib/base.php')){
+       die('Please update the path to /lib/base.php in carddav.php or make use of /remote.php/carddav/');
+}
+require_once('../../lib/base.php');
+require_once('appinfo/remote.php');
\ No newline at end of file