aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-11-30 16:00:19 +0100
committerMorris Jobke <hey@morrisjobke.de>2017-11-30 16:04:07 +0100
commitf22e02cd79e27b1d994fd84a98eb5a8c60563e72 (patch)
treeed473f4d77fcbb8b1be958c1e29f5fee72336ecb /apps/dav/lib
parent288f50bdc72011ce4e045322698793a843e09b0a (diff)
downloadnextcloud-server-f22e02cd79e27b1d994fd84a98eb5a8c60563e72.tar.gz
nextcloud-server-f22e02cd79e27b1d994fd84a98eb5a8c60563e72.zip
Refactor method to check if update is needed
There was only one call, that actually needed the parameter to be set to true. So this change moved the print of the page to that location and replaces all other occurences with a direct call to the underlying OCP API. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/Connector/Sabre/MaintenancePlugin.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php b/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php
index 21bffcdb299..36110c81db9 100644
--- a/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php
+++ b/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php
@@ -27,6 +27,7 @@
namespace OCA\DAV\Connector\Sabre;
use OCP\IConfig;
+use OCP\Util;
use Sabre\DAV\Exception\ServiceUnavailable;
use Sabre\DAV\ServerPlugin;
@@ -80,7 +81,7 @@ class MaintenancePlugin extends ServerPlugin {
if ($this->config->getSystemValue('maintenance', false)) {
throw new ServiceUnavailable('System in maintenance mode.');
}
- if (\OC::checkUpgrade(false)) {
+ if (Util::needUpgrade()) {
throw new ServiceUnavailable('Upgrade needed');
}