@@ -58,6 +58,7 @@ public function __construct(
5858 private INavigationManager $ navigationManager ,
5959 private ITemplateManager $ templateManager ,
6060 private ServerVersion $ serverVersion ,
61+ private IRequest $ request ,
6162 ) {
6263 }
6364
@@ -72,7 +73,8 @@ public function getPageTemplate(string $renderAs, string $appId): ITemplate {
7273 switch ($ renderAs ) {
7374 case TemplateResponse::RENDER_AS_USER :
7475 $ page = $ this ->templateManager ->getTemplate ('core ' , 'layout.user ' );
75- if (in_array (\OC_App::getCurrentApp (), ['settings ' ,'admin ' , 'help ' ]) !== false ) {
76+ $ pathInfo = $ this ->request ->getPathInfo ();
77+ if ($ pathInfo !== false && str_starts_with ($ pathInfo , '/settings/ ' )) {
7678 $ page ->assign ('bodyid ' , 'body-settings ' );
7779 } else {
7880 $ page ->assign ('bodyid ' , 'body-user ' );
@@ -254,10 +256,8 @@ public function getPageTemplate(string $renderAs, string $appId): ITemplate {
254256 $ page ->append ('jsfiles ' , $ web . '/ ' . $ file . $ this ->getVersionHashSuffix ());
255257 }
256258
257- $ request = Server::get (IRequest::class);
258-
259259 try {
260- $ pathInfo = $ request ->getPathInfo ();
260+ $ pathInfo = $ this -> request ->getPathInfo ();
261261 } catch (\Exception $ e ) {
262262 $ pathInfo = '' ;
263263 }
@@ -298,7 +298,7 @@ public function getPageTemplate(string $renderAs, string $appId): ITemplate {
298298 }
299299 }
300300
301- if ($ request ->isUserAgent ([Request::USER_AGENT_CLIENT_IOS , Request::USER_AGENT_SAFARI , Request::USER_AGENT_SAFARI_MOBILE ])) {
301+ if ($ this -> request ->isUserAgent ([Request::USER_AGENT_CLIENT_IOS , Request::USER_AGENT_SAFARI , Request::USER_AGENT_SAFARI_MOBILE ])) {
302302 // Prevent auto zoom with iOS but still allow user zoom
303303 // On chrome (and others) this does not work (will also disable user zoom)
304304 $ page ->assign ('viewport_maximum_scale ' , '1.0 ' );
0 commit comments