diff options
Diffstat (limited to 'lib/private/connector/sabre/quotaplugin.php')
-rw-r--r-- | lib/private/connector/sabre/quotaplugin.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/private/connector/sabre/quotaplugin.php b/lib/private/connector/sabre/quotaplugin.php index c9b8336b57b..cf3c1103f84 100644 --- a/lib/private/connector/sabre/quotaplugin.php +++ b/lib/private/connector/sabre/quotaplugin.php @@ -1,4 +1,5 @@ <?php +use Sabre\DAV\URLUtil; /** * This plugin check user quota and deny creating files when they exceeds the quota. @@ -7,7 +8,7 @@ * @copyright Copyright (C) 2012 entreCables S.L. All rights reserved. * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License */ -class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin { +class OC_Connector_Sabre_QuotaPlugin extends \Sabre\DAV\ServerPlugin { /** * @var \OC\Files\View @@ -17,7 +18,7 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin { /** * Reference to main server object * - * @var Sabre_DAV_Server + * @var \Sabre\DAV\Server */ private $server; @@ -31,15 +32,15 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin { /** * This initializes the plugin. * - * This function is called by Sabre_DAV_Server, after + * This function is called by \Sabre\DAV\Server, after * addPlugin is called. * * This method should set up the requires event subscriptions. * - * @param Sabre_DAV_Server $server + * @param \Sabre\DAV\Server $server * @return void */ - public function initialize(Sabre_DAV_Server $server) { + public function initialize(\Sabre\DAV\Server $server) { $this->server = $server; @@ -52,7 +53,7 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin { * * @param string $uri * @param null $data - * @throws Sabre_DAV_Exception_InsufficientStorage + * @throws \Sabre\DAV\Exception\InsufficientStorage * @return bool */ public function checkQuota($uri, $data = null) { @@ -61,7 +62,7 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin { if (substr($uri, 0, 1) !== '/') { $uri = '/' . $uri; } - list($parentUri, $newName) = Sabre_DAV_URLUtil::splitPath($uri); + list($parentUri, $newName) = URLUtil::splitPath($uri); $req = $this->server->httpRequest; if ($req->getHeader('OC-Chunked')) { $info = OC_FileChunking::decodeName($newName); @@ -75,7 +76,7 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin { if (isset($chunkHandler)) { $chunkHandler->cleanup(); } - throw new Sabre_DAV_Exception_InsufficientStorage(); + throw new \Sabre\DAV\Exception\InsufficientStorage(); } } return true; |