]> source.dussan.org Git - nextcloud-server.git/commitdiff
make *DAV work with movable apps
authorGeorg Ehrke <dev@georgswebsite.de>
Thu, 26 Apr 2012 19:56:29 +0000 (21:56 +0200)
committerGeorg Ehrke <dev@georgswebsite.de>
Thu, 26 Apr 2012 19:56:29 +0000 (21:56 +0200)
apps/calendar/caldav.php
apps/contacts/carddav.php
apps/files/webdav.php
apps/inc.php [new file with mode: 0644]
lib/base.php

index a319fd05223938627b8279f05ef0eac0ded7feeb..7210b25879f47606a41ed0b5de07e96c494293b8 100644 (file)
@@ -8,7 +8,7 @@
 
 // Do not load FS ...
 $RUNTIME_NOSETUPFS = true;
-
+require_once('../inc.php');
 
 OC_Util::checkAppEnabled('calendar');
 
index 794fb890898b912a0872219e001ec14617b5eff5..1a11ccdb3f711893cbcfd1f9c8be71484dfa6125 100644 (file)
@@ -22,7 +22,7 @@
 
 // Do not load FS ...
 $RUNTIME_NOSETUPFS = true;
-
+require_once('../inc.php');
 
 OC_Util::checkAppEnabled('contacts');
 
index 3418eba5a6c6ef5a80ecf671459e29682d892cea..940bbfef52ee6dbe80bd0e61194e0680ef3fb025 100644 (file)
@@ -25,6 +25,7 @@
 
 // Do not load FS ...
 $RUNTIME_NOSETUPFS = true;
+require_once('../inc.php');
 
 // only need filesystem apps
 $RUNTIME_APPTYPES=array('filesystem','authentication');
@@ -40,7 +41,7 @@ $publicDir = new OC_Connector_Sabre_Directory('');
 
 // Fire up server
 $server = new Sabre_DAV_Server($publicDir);
-$server->setBaseUri(OC::$WEBROOT.'/files/webdav.php');
+$server->setBaseUri(OC::$APPSWEBROOT.'/apps/files/webdav.php');
 
 // Load plugins
 $server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud'));
diff --git a/apps/inc.php b/apps/inc.php
new file mode 100644 (file)
index 0000000..cbfab01
--- /dev/null
@@ -0,0 +1 @@
+<?php require_once('/Applications/MAMP/htdocs/owncloud/lib/base.php'); ?>
\ No newline at end of file
index fa4c9850a3b1c4e70973e17beee56f24439b2ce3..ba378653f475615c7112bb51f0069f3488b5edd0 100644 (file)
@@ -413,6 +413,7 @@ class OC{
                //make sure temporary files are cleaned up
                register_shutdown_function(array('OC_Helper','cleanTmp'));
                
+               //parse the given parameters
                self::$REQUESTEDAPP = (isset($_GET['app'])?strip_tags($_GET['app']):'files');
                self::$REQUESTEDFILE = (isset($_GET['getfile'])?$_GET['getfile']:null);
                if(substr_count(self::$REQUESTEDFILE, '?') != 0){
@@ -432,6 +433,9 @@ class OC{
                                exit;
                        }
                }
+
+               //update path to lib base
+               file_put_contents(OC::$APPSROOT . '/apps/inc.php', '<?php require_once(\'' . OC::$SERVERROOT . '/lib/base.php' . '\'); ?>');
        }
 }