From 4e43e3626e3f17435d011102d97e408e856fcabd Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 25 Jun 2014 18:17:17 +0200 Subject: Prevent loading apps in remote when an upgrade is due --- remote.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'remote.php') diff --git a/remote.php b/remote.php index 232e47ee402..a91742b0475 100644 --- a/remote.php +++ b/remote.php @@ -2,6 +2,15 @@ try { require_once 'lib/base.php'; + + if (\OCP\Util::needUpgrade()) { + // since the behavior of apps or remotes are unpredictable during + // an upgrade, return a 503 directly + OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE); + OC_Template::printErrorPage('Service unavailable'); + exit; + } + $path_info = OC_Request::getPathInfo(); if ($path_info === false || $path_info === '') { OC_Response::setStatus(OC_Response::STATUS_NOT_FOUND); -- cgit v1.2.3