Skip to content
Snippets Groups Projects
Commit 4e43e362 authored by Vincent Petry's avatar Vincent Petry
Browse files

Prevent loading apps in remote when an upgrade is due

parent c6bcb07f
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,15 @@ ...@@ -2,6 +2,15 @@
try { try {
require_once 'lib/base.php'; 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(); $path_info = OC_Request::getPathInfo();
if ($path_info === false || $path_info === '') { if ($path_info === false || $path_info === '') {
OC_Response::setStatus(OC_Response::STATUS_NOT_FOUND); OC_Response::setStatus(OC_Response::STATUS_NOT_FOUND);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment