summaryrefslogtreecommitdiffstats
path: root/lib/private/connector/sabre/maintenanceplugin.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-02-12 12:29:01 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-02-23 22:27:23 +0100
commit9f6dcb9d3e2f43f336dafeb739e04ba9614d9b5f (patch)
treefa72017a9bf76c526ddb3dfe0969f0584a4a7d67 /lib/private/connector/sabre/maintenanceplugin.php
parent66e3211fd8a57b0fb296d1dcc980272721e9f99d (diff)
downloadnextcloud-server-9f6dcb9d3e2f43f336dafeb739e04ba9614d9b5f.tar.gz
nextcloud-server-9f6dcb9d3e2f43f336dafeb739e04ba9614d9b5f.zip
Sabre Update to 2.1
- VObject fixes for Sabre\VObject 3.3 - Remove VObject property workarounds - Added prefetching for tags in sabre tags plugin - Moved oc_properties logic to separate PropertyStorage backend (WIP) - Fixed Sabre connector namespaces - Improved files plugin to handle props on-demand - Moved allowed props from server class to files plugin - Fixed tags caching for files that are known to have no tags (less queries) - Added/fixed unit tests for Sabre FilesPlugin, TagsPlugin - Replace OC\Connector\Sabre\Request with direct call to httpRequest->setUrl() - Fix exception detection in DAV client when using Sabre\DAV\Client - Added setETag() on Node instead of using the static FileSystem - Also preload tags/props when depth is infinity
Diffstat (limited to 'lib/private/connector/sabre/maintenanceplugin.php')
-rw-r--r--lib/private/connector/sabre/maintenanceplugin.php30
1 files changed, 6 insertions, 24 deletions
diff --git a/lib/private/connector/sabre/maintenanceplugin.php b/lib/private/connector/sabre/maintenanceplugin.php
index 3d4e19ec470..ff55cdceab6 100644
--- a/lib/private/connector/sabre/maintenanceplugin.php
+++ b/lib/private/connector/sabre/maintenanceplugin.php
@@ -1,25 +1,7 @@
<?php
-/**
- * @author Bart Visscher <bartv@thisnet.nl>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * 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/>
- *
- */
-class OC_Connector_Sabre_MaintenancePlugin extends \Sabre\DAV\ServerPlugin
+namespace OC\Connector\Sabre;
+
+class MaintenancePlugin extends \Sabre\DAV\ServerPlugin
{
/**
@@ -43,7 +25,7 @@ class OC_Connector_Sabre_MaintenancePlugin extends \Sabre\DAV\ServerPlugin
public function initialize(\Sabre\DAV\Server $server) {
$this->server = $server;
- $this->server->subscribeEvent('beforeMethod', array($this, 'checkMaintenanceMode'), 10);
+ $this->server->on('beforeMethod', array($this, 'checkMaintenanceMode'), 10);
}
/**
@@ -55,10 +37,10 @@ class OC_Connector_Sabre_MaintenancePlugin extends \Sabre\DAV\ServerPlugin
* @return bool
*/
public function checkMaintenanceMode() {
- if (OC_Config::getValue('maintenance', false)) {
+ if (\OC_Config::getValue('maintenance', false)) {
throw new \Sabre\DAV\Exception\ServiceUnavailable();
}
- if (OC::checkUpgrade(false)) {
+ if (\OC::checkUpgrade(false)) {
throw new \Sabre\DAV\Exception\ServiceUnavailable('Upgrade needed');
}