fix generation of an url to an absolute ocs route when NC in subfolder
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
6a940d5c74
commit
b57d8b92d6
1 changed files with 3 additions and 2 deletions
|
@ -94,8 +94,9 @@ class URLGenerator implements IURLGenerator {
|
|||
public function linkToOCSRouteAbsolute(string $routeName, array $arguments = []): string {
|
||||
$route = \OC::$server->getRouter()->generate('ocs.'.$routeName, $arguments, false);
|
||||
|
||||
if (strpos($route, '/index.php') === 0) {
|
||||
$route = substr($route, 10);
|
||||
$indexPhpPos = strpos($route, '/index.php/');
|
||||
if ($indexPhpPos !== false) {
|
||||
$route = substr($route, $indexPhpPos + 10);
|
||||
}
|
||||
|
||||
$route = substr($route, 7);
|
||||
|
|
Loading…
Reference in a new issue