From af76cb79209cb07df47a572ca2f477fbdca44889 Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Tue, 6 Sep 2016 23:19:07 +0300 Subject: Pass web requests to occ controller if upgrade is needed --- lib/base.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/base.php b/lib/base.php index e366834935e..9f7cc1858b6 100644 --- a/lib/base.php +++ b/lib/base.php @@ -906,6 +906,12 @@ class OC { OC_Util::setupFS(); OC::$server->getRouter()->match(\OC::$server->getRequest()->getRawPathInfo()); return; + } catch (\OC\NeedsUpdateException $e) { + if ($isOccControllerRequested && $needUpgrade){ + OC::$server->getRouter()->match(\OC::$server->getRequest()->getRawPathInfo()); + return; + } + throw $e; } catch (Symfony\Component\Routing\Exception\ResourceNotFoundException $e) { //header('HTTP/1.0 404 Not Found'); } catch (Symfony\Component\Routing\Exception\MethodNotAllowedException $e) { -- cgit v1.2.3