File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -113,12 +113,16 @@ public function __construct(
113113 protected function getGlobalPrefix (): string {
114114 if ($ this ->globalPrefix === null ) {
115115 $ config = \OCP \Server::get (SystemConfig::class);
116+ $ maintenanceMode = $ config ->getValue ('maintenance ' , false );
116117 $ versions = [];
117- if ($ config ->getValue ('installed ' , false )) {
118+ if ($ config ->getValue ('installed ' , false ) && ! $ maintenanceMode ) {
118119 $ appConfig = \OCP \Server::get (IAppConfig::class);
119120 // only get the enabled apps to clear the cache in case an app is enabled or disabled (e.g. clear routes)
120121 $ versions = $ appConfig ->getAppInstalledVersions (true );
121122 ksort ($ versions );
123+ } else {
124+ // if not installed or in maintenance mode, we should distinguish between both states.
125+ $ versions ['core:maintenance ' ] = $ maintenanceMode ? '1 ' : '0 ' ;
122126 }
123127 $ versions ['core ' ] = implode ('. ' , $ this ->serverVersion ->getVersion ());
124128
You can’t perform that action at this time.
0 commit comments