Skip to content
Snippets Groups Projects
Unverified Commit b57d8b92 authored by Arthur Schiwon's avatar Arthur Schiwon
Browse files

fix generation of an url to an absolute ocs route when NC in subfolder

parent 6a940d5c
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment