diff options
author | Frank Karlitschek <karlitschek@kde.org> | 2012-02-15 20:40:37 +0100 |
---|---|---|
committer | Frank Karlitschek <karlitschek@kde.org> | 2012-02-15 20:40:37 +0100 |
commit | dccdeca2581f705c69eb4266aa646173f588a9de (patch) | |
tree | f4cb27fc31b331e03f14cf1c2a1f4719ebb62cdc /3rdparty/Sabre/DAV/Mount/Plugin.php | |
parent | c2fb5fed029a77f4cdcd6a8b9a6308ef40091639 (diff) | |
download | nextcloud-server-dccdeca2581f705c69eb4266aa646173f588a9de.tar.gz nextcloud-server-dccdeca2581f705c69eb4266aa646173f588a9de.zip |
remove the 3rdparty files. everything is now in https://gitorious.org/owncloud/3rdparty
Diffstat (limited to '3rdparty/Sabre/DAV/Mount/Plugin.php')
-rw-r--r-- | 3rdparty/Sabre/DAV/Mount/Plugin.php | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/3rdparty/Sabre/DAV/Mount/Plugin.php b/3rdparty/Sabre/DAV/Mount/Plugin.php deleted file mode 100644 index f93a1aa25a1..00000000000 --- a/3rdparty/Sabre/DAV/Mount/Plugin.php +++ /dev/null @@ -1,79 +0,0 @@ -<?php - -/** - * This plugin provides support for RFC4709: Mounting WebDAV servers - * - * Simply append ?mount to any collection to generate the davmount response. - * - * @package Sabre - * @subpackage DAV - * @copyright Copyright (C) 2007-2011 Rooftop Solutions. All rights reserved. - * @author Evert Pot (http://www.rooftopsolutions.nl/) - */ -class Sabre_DAV_Mount_Plugin extends Sabre_DAV_ServerPlugin { - - /** - * Reference to Server class - * - * @var Sabre_DAV_Server - */ - private $server; - - /** - * Initializes the plugin and registers event handles - * - * @param Sabre_DAV_Server $server - * @return void - */ - public function initialize(Sabre_DAV_Server $server) { - - $this->server = $server; - $this->server->subscribeEvent('beforeMethod',array($this,'beforeMethod'), 90); - - } - - /** - * 'beforeMethod' event handles. This event handles intercepts GET requests ending - * with ?mount - * - * @param string $method - * @return void - */ - public function beforeMethod($method, $uri) { - - if ($method!='GET') return; - if ($this->server->httpRequest->getQueryString()!='mount') return; - - $currentUri = $this->server->httpRequest->getAbsoluteUri(); - - // Stripping off everything after the ? - list($currentUri) = explode('?',$currentUri); - - $this->davMount($currentUri); - - // Returning false to break the event chain - return false; - - } - - /** - * Generates the davmount response - * - * @param string $uri absolute uri - * @return void - */ - public function davMount($uri) { - - $this->server->httpResponse->sendStatus(200); - $this->server->httpResponse->setHeader('Content-Type','application/davmount+xml'); - ob_start(); - echo '<?xml version="1.0"?>', "\n"; - echo "<dm:mount xmlns:dm=\"http://purl.org/NET/webdav/mount\">\n"; - echo " <dm:url>", htmlspecialchars($uri, ENT_NOQUOTES, 'UTF-8'), "</dm:url>\n"; - echo "</dm:mount>"; - $this->server->httpResponse->sendBody(ob_get_clean()); - - } - - -} |