зеркало из https://github.com/nextcloud/server.git
make *DAV work with movable apps
This commit is contained in:
Родитель
6930af4c0f
Коммит
5fda0e4b3b
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
// Do not load FS ...
|
// Do not load FS ...
|
||||||
$RUNTIME_NOSETUPFS = true;
|
$RUNTIME_NOSETUPFS = true;
|
||||||
|
require_once('../inc.php');
|
||||||
|
|
||||||
OC_Util::checkAppEnabled('calendar');
|
OC_Util::checkAppEnabled('calendar');
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
// Do not load FS ...
|
// Do not load FS ...
|
||||||
$RUNTIME_NOSETUPFS = true;
|
$RUNTIME_NOSETUPFS = true;
|
||||||
|
require_once('../inc.php');
|
||||||
|
|
||||||
OC_Util::checkAppEnabled('contacts');
|
OC_Util::checkAppEnabled('contacts');
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
// Do not load FS ...
|
// Do not load FS ...
|
||||||
$RUNTIME_NOSETUPFS = true;
|
$RUNTIME_NOSETUPFS = true;
|
||||||
|
require_once('../inc.php');
|
||||||
|
|
||||||
// only need filesystem apps
|
// only need filesystem apps
|
||||||
$RUNTIME_APPTYPES=array('filesystem','authentication');
|
$RUNTIME_APPTYPES=array('filesystem','authentication');
|
||||||
|
@ -40,7 +41,7 @@ $publicDir = new OC_Connector_Sabre_Directory('');
|
||||||
|
|
||||||
// Fire up server
|
// Fire up server
|
||||||
$server = new Sabre_DAV_Server($publicDir);
|
$server = new Sabre_DAV_Server($publicDir);
|
||||||
$server->setBaseUri(OC::$WEBROOT.'/files/webdav.php');
|
$server->setBaseUri(OC::$APPSWEBROOT.'/apps/files/webdav.php');
|
||||||
|
|
||||||
// Load plugins
|
// Load plugins
|
||||||
$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud'));
|
$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud'));
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<?php require_once('/Applications/MAMP/htdocs/owncloud/lib/base.php'); ?>
|
|
@ -413,6 +413,7 @@ class OC{
|
||||||
//make sure temporary files are cleaned up
|
//make sure temporary files are cleaned up
|
||||||
register_shutdown_function(array('OC_Helper','cleanTmp'));
|
register_shutdown_function(array('OC_Helper','cleanTmp'));
|
||||||
|
|
||||||
|
//parse the given parameters
|
||||||
self::$REQUESTEDAPP = (isset($_GET['app'])?strip_tags($_GET['app']):'files');
|
self::$REQUESTEDAPP = (isset($_GET['app'])?strip_tags($_GET['app']):'files');
|
||||||
self::$REQUESTEDFILE = (isset($_GET['getfile'])?$_GET['getfile']:null);
|
self::$REQUESTEDFILE = (isset($_GET['getfile'])?$_GET['getfile']:null);
|
||||||
if(substr_count(self::$REQUESTEDFILE, '?') != 0){
|
if(substr_count(self::$REQUESTEDFILE, '?') != 0){
|
||||||
|
@ -432,6 +433,9 @@ class OC{
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//update path to lib base
|
||||||
|
file_put_contents(OC::$APPSROOT . '/apps/inc.php', '<?php require_once(\'' . OC::$SERVERROOT . '/lib/base.php' . '\'); ?>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче