@@ -80,12 +80,6 @@ public function getPageTemplate(string $renderAs, string $appId): ITemplate {
8080				} else  {
8181					Util::addScript ('core ' , 'unified-search ' , 'core ' );
8282				}
83- 				// Set body data-theme 
84- 				$ pageassign ('enabledThemes ' , []);
85- 				if  ($ this appManager ->isEnabledForUser ('theming ' ) && class_exists ('\OCA\Theming\Service\ThemesService ' )) {
86- 					$ themesServiceget (\OCA \Theming \Service \ThemesService::class);
87- 					$ pageassign ('enabledThemes ' , $ themesServicegetEnabledThemes ());
88- 				}
8983
9084				// Set logo link target 
9185				$ logoUrl$ this config ->getSystemValueString ('logo_url ' , '' );
@@ -164,13 +158,6 @@ public function getPageTemplate(string $renderAs, string $appId): ITemplate {
164158				$ pageassign ('appid ' , $ appId
165159				$ pageassign ('bodyid ' , 'body-public ' );
166160
167- 				// Set body data-theme 
168- 				$ pageassign ('enabledThemes ' , []);
169- 				if  ($ this appManager ->isEnabledForUser ('theming ' ) && class_exists ('\OCA\Theming\Service\ThemesService ' )) {
170- 					$ themesServiceget (\OCA \Theming \Service \ThemesService::class);
171- 					$ pageassign ('enabledThemes ' , $ themesServicegetEnabledThemes ());
172- 				}
173- 
174161				// Set logo link target 
175162				$ logoUrl$ this config ->getSystemValueString ('logo_url ' , '' );
176163				$ pageassign ('logoUrl ' , $ logoUrl
@@ -210,6 +197,10 @@ public function getPageTemplate(string $renderAs, string $appId): ITemplate {
210197		$ pageassign ('locale ' , $ locale
211198		$ pageassign ('direction ' , $ direction
212199
200+ 		// Set body data-theme 
201+ 		$ themesServiceget (\OCA \Theming \Service \ThemesService::class);
202+ 		$ pageassign ('enabledThemes ' , $ themesServicegetEnabledThemes ());
203+ 
213204		if  ($ this config ->getSystemValueBool ('installed ' , false )) {
214205			if  (empty (self ::$ versionHash
215206				$ v$ this appManager ->getAppInstalledVersions ();
0 commit comments