summaryrefslogtreecommitdiffstats
path: root/lib/private/connector/sabre/maintenanceplugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/connector/sabre/maintenanceplugin.php')
-rw-r--r--lib/private/connector/sabre/maintenanceplugin.php18
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/private/connector/sabre/maintenanceplugin.php b/lib/private/connector/sabre/maintenanceplugin.php
index 2eda269afc2..0208f3fb5a6 100644
--- a/lib/private/connector/sabre/maintenanceplugin.php
+++ b/lib/private/connector/sabre/maintenanceplugin.php
@@ -9,30 +9,28 @@
* @license AGPL3
*/
-require 'ServiceUnavailable.php';
-
-class OC_Connector_Sabre_MaintenancePlugin extends Sabre_DAV_ServerPlugin
+class OC_Connector_Sabre_MaintenancePlugin extends \Sabre\DAV\ServerPlugin
{
/**
* Reference to main server object
*
- * @var Sabre_DAV_Server
+ * @var \Sabre\DAV\Server
*/
private $server;
/**
* 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 required 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;
$this->server->subscribeEvent('beforeMethod', array($this, 'checkMaintenanceMode'), 10);
@@ -42,16 +40,16 @@ class OC_Connector_Sabre_MaintenancePlugin extends Sabre_DAV_ServerPlugin
* This method is called before any HTTP method and returns http status code 503
* in case the system is in maintenance mode.
*
- * @throws Sabre_DAV_Exception_ServiceUnavailable
+ * @throws \Sabre\DAV\Exception\ServiceUnavailable
* @internal param string $method
* @return bool
*/
public function checkMaintenanceMode() {
if (OC_Config::getValue('maintenance', false)) {
- throw new Sabre_DAV_Exception_ServiceUnavailable();
+ throw new \Sabre\DAV\Exception\ServiceUnavailable();
}
if (OC::checkUpgrade(false)) {
- throw new Sabre_DAV_Exception_ServiceUnavailable('Upgrade needed');
+ throw new \Sabre\DAV\Exception\ServiceUnavailable('Upgrade needed');
}
return true;