nextcloud/apps/files/appinfo/remote.php

56 lines
1.8 KiB
PHP
Raw Normal View History

2010-03-10 15:03:40 +03:00
<?php
/**
2015-03-26 13:44:34 +03:00
* @author Frank Karlitschek <frank@owncloud.org>
* @author Jakob Sack <mail@jakobsack.de>
2015-10-05 21:54:56 +03:00
* @author Joas Schilling <nickvergessen@owncloud.com>
2015-03-26 13:44:34 +03: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 17:53:34 +04:00
*
2015-03-26 13:44:34 +03:00
* @copyright Copyright (c) 2015, ownCloud, Inc.
* @license AGPL-3.0
2011-07-20 17:53:34 +04:00
*
2015-03-26 13:44:34 +03: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 17:53:34 +04:00
*
2015-03-26 13:44:34 +03:00
* This program is distributed in the hope that it will be useful,
2011-07-20 17:53:34 +04:00
* but WITHOUT ANY WARRANTY; without even the implied warranty of
2015-03-26 13:44:34 +03:00
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
2011-07-20 17:53:34 +04:00
*
2015-03-26 13:44:34 +03: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 17:53:34 +04:00
*
*/
2015-03-26 13:55:26 +03:00
// no php execution timeout for webdav
set_time_limit(0);
// Turn off output buffering to prevent memory problems
\OC_Util::obEnd();
2015-03-26 13:55:26 +03:00
$serverFactory = new \OC\Connector\Sabre\ServerFactory(
\OC::$server->getConfig(),
\OC::$server->getLogger(),
\OC::$server->getDatabaseConnection(),
\OC::$server->getUserSession(),
\OC::$server->getMountManager(),
\OC::$server->getTagManager(),
\OC::$server->getEventDispatcher()
);
// Backends
$authBackend = new \OC\Connector\Sabre\Auth();
$requestUri = \OC::$server->getRequest()->getRequestUri();
2010-03-10 15:03:40 +03:00
$server = $serverFactory->createServer($baseuri, $requestUri, $authBackend, function() {
// use the view for the logged in user
return \OC\Files\Filesystem::getView();
});
2011-07-20 18:36:36 +04:00
// And off we go!
$server->exec();