2010-03-10 07:03:40 -05:00
|
|
|
<?php
|
|
|
|
|
/**
|
2015-03-26 06:44:34 -04:00
|
|
|
* @author Frank Karlitschek <frank@owncloud.org>
|
|
|
|
|
* @author Jakob Sack <mail@jakobsack.de>
|
2015-10-05 14:54:56 -04:00
|
|
|
* @author Joas Schilling <nickvergessen@owncloud.com>
|
2015-03-26 06:44:34 -04:00
|
|
|
* @author Lukas Reschke <lukas@owncloud.com>
|
|
|
|
|
* @author Morris Jobke <hey@morrisjobke.de>
|
|
|
|
|
* @author Robin Appelman <icewind@owncloud.com>
|
|
|
|
|
* @author Thomas Müller <thomas.mueller@tmit.eu>
|
|
|
|
|
* @author Vincent Petry <pvince81@owncloud.com>
|
2011-07-20 09:53:34 -04:00
|
|
|
*
|
2015-03-26 06:44:34 -04:00
|
|
|
* @copyright Copyright (c) 2015, ownCloud, Inc.
|
|
|
|
|
* @license AGPL-3.0
|
2011-07-20 09:53:34 -04:00
|
|
|
*
|
2015-03-26 06:44:34 -04:00
|
|
|
* This code is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
|
|
|
* as published by the Free Software Foundation.
|
2011-07-20 09:53:34 -04:00
|
|
|
*
|
2015-03-26 06:44:34 -04:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
2011-07-20 09:53:34 -04:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2015-03-26 06:44:34 -04:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU Affero General Public License for more details.
|
2011-07-20 09:53:34 -04:00
|
|
|
*
|
2015-03-26 06:44:34 -04:00
|
|
|
* You should have received a copy of the GNU Affero General Public License, version 3,
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
2011-07-20 09:53:34 -04:00
|
|
|
*
|
|
|
|
|
*/
|
2015-02-26 05:37:37 -05:00
|
|
|
|
2015-03-26 06:55:26 -04:00
|
|
|
// no php execution timeout for webdav
|
|
|
|
|
set_time_limit(0);
|
|
|
|
|
|
2015-05-04 08:15:15 -04:00
|
|
|
// Turn off output buffering to prevent memory problems
|
|
|
|
|
\OC_Util::obEnd();
|
2015-03-26 06:55:26 -04:00
|
|
|
|
2015-08-07 11:36:14 -04:00
|
|
|
$serverFactory = new \OC\Connector\Sabre\ServerFactory(
|
|
|
|
|
\OC::$server->getConfig(),
|
|
|
|
|
\OC::$server->getLogger(),
|
|
|
|
|
\OC::$server->getDatabaseConnection(),
|
|
|
|
|
\OC::$server->getUserSession(),
|
|
|
|
|
\OC::$server->getMountManager(),
|
2015-09-17 07:47:58 -04:00
|
|
|
\OC::$server->getTagManager(),
|
|
|
|
|
\OC::$server->getEventDispatcher()
|
2015-08-07 11:36:14 -04:00
|
|
|
);
|
|
|
|
|
|
2011-08-06 05:36:56 -04:00
|
|
|
// Backends
|
2015-02-12 06:29:01 -05:00
|
|
|
$authBackend = new \OC\Connector\Sabre\Auth();
|
2015-08-07 11:36:14 -04:00
|
|
|
$requestUri = \OC::$server->getRequest()->getRequestUri();
|
2010-03-10 07:03:40 -05:00
|
|
|
|
2015-08-07 11:36:14 -04:00
|
|
|
$server = $serverFactory->createServer($baseuri, $requestUri, $authBackend, function() {
|
|
|
|
|
// use the view for the logged in user
|
|
|
|
|
return \OC\Files\Filesystem::getView();
|
|
|
|
|
});
|
2014-02-25 10:23:09 -05:00
|
|
|
|
2011-07-20 10:36:36 -04:00
|
|
|
// And off we go!
|
|
|
|
|
$server->exec();
|