Merge pull request 'use app href for redirection' (#245) from fix/issue244 into develop
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Reviewed-on: #245
This commit is contained in:
commit
88c14b6aec
|
@ -78,14 +78,15 @@ class AppController extends Controller
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->redirectToApp($app['id']);
|
return $this->redirectToApp($app, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->redirectToApp('files');
|
return $this->redirectToApp('files');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function redirectToApp($appId): RedirectResponse
|
protected function redirectToApp($app, bool $isHref = false): RedirectResponse
|
||||||
{
|
{
|
||||||
|
if (!$isHref) {
|
||||||
$isIgnoreFrontController = true === OC::$server->getConfig()->getSystemValue(
|
$isIgnoreFrontController = true === OC::$server->getConfig()->getSystemValue(
|
||||||
'htaccess.IgnoreFrontController',
|
'htaccess.IgnoreFrontController',
|
||||||
false
|
false
|
||||||
|
@ -99,7 +100,10 @@ class AppController extends Controller
|
||||||
$path = '/index.php/apps/%s/';
|
$path = '/index.php/apps/%s/';
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = $this->urlGenerator->getAbsoluteURL(sprintf($path, $appId));
|
$url = $this->urlGenerator->getAbsoluteURL(sprintf($path, $app));
|
||||||
|
} else {
|
||||||
|
$url = $app['href'];
|
||||||
|
}
|
||||||
|
|
||||||
return new RedirectResponse($url);
|
return new RedirectResponse($url);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue