|
|
|
@ -360,6 +360,13 @@ class Router implements IRouter {
|
|
|
|
|
if ($absolute === false) {
|
|
|
|
|
$referenceType = UrlGenerator::ABSOLUTE_PATH;
|
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
* The route name has to be lowercase, for symfony to match it correctly.
|
|
|
|
|
* This is required because smyfony allows mixed casing for controller names in the routes.
|
|
|
|
|
* To avoid breaking all the existing route names, registering and matching will only use the lowercase names.
|
|
|
|
|
* This is also safe on the PHP side because class and method names collide regardless of the casing.
|
|
|
|
|
*/
|
|
|
|
|
$name = strtolower($name);
|
|
|
|
|
$name = $this->fixLegacyRootName($name);
|
|
|
|
|
if (str_contains($name, '.')) {
|
|
|
|
|
[$appName, $other] = explode('.', $name, 3);
|
|
|
|
@ -385,29 +392,29 @@ class Router implements IRouter {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function fixLegacyRootName(string $routeName): string {
|
|
|
|
|
if ($routeName === 'files.viewcontroller.showFile') {
|
|
|
|
|
return 'files.View.showFile';
|
|
|
|
|
if ($routeName === 'files.viewcontroller.showfile') {
|
|
|
|
|
return 'files.view.showfile';
|
|
|
|
|
}
|
|
|
|
|
if ($routeName === 'files_sharing.sharecontroller.showShare') {
|
|
|
|
|
return 'files_sharing.Share.showShare';
|
|
|
|
|
if ($routeName === 'files_sharing.sharecontroller.showshare') {
|
|
|
|
|
return 'files_sharing.share.showshare';
|
|
|
|
|
}
|
|
|
|
|
if ($routeName === 'files_sharing.sharecontroller.showAuthenticate') {
|
|
|
|
|
return 'files_sharing.Share.showAuthenticate';
|
|
|
|
|
if ($routeName === 'files_sharing.sharecontroller.showauthenticate') {
|
|
|
|
|
return 'files_sharing.share.showauthenticate';
|
|
|
|
|
}
|
|
|
|
|
if ($routeName === 'files_sharing.sharecontroller.authenticate') {
|
|
|
|
|
return 'files_sharing.Share.authenticate';
|
|
|
|
|
return 'files_sharing.share.authenticate';
|
|
|
|
|
}
|
|
|
|
|
if ($routeName === 'files_sharing.sharecontroller.downloadShare') {
|
|
|
|
|
return 'files_sharing.Share.downloadShare';
|
|
|
|
|
if ($routeName === 'files_sharing.sharecontroller.downloadshare') {
|
|
|
|
|
return 'files_sharing.share.downloadshare';
|
|
|
|
|
}
|
|
|
|
|
if ($routeName === 'files_sharing.publicpreview.directLink') {
|
|
|
|
|
return 'files_sharing.PublicPreview.directLink';
|
|
|
|
|
if ($routeName === 'files_sharing.publicpreview.directlink') {
|
|
|
|
|
return 'files_sharing.publicpreview.directlink';
|
|
|
|
|
}
|
|
|
|
|
if ($routeName === 'cloud_federation_api.requesthandlercontroller.addShare') {
|
|
|
|
|
return 'cloud_federation_api.RequestHandler.addShare';
|
|
|
|
|
if ($routeName === 'cloud_federation_api.requesthandlercontroller.addshare') {
|
|
|
|
|
return 'cloud_federation_api.requesthandler.addshare';
|
|
|
|
|
}
|
|
|
|
|
if ($routeName === 'cloud_federation_api.requesthandlercontroller.receiveNotification') {
|
|
|
|
|
return 'cloud_federation_api.RequestHandler.receiveNotification';
|
|
|
|
|
if ($routeName === 'cloud_federation_api.requesthandlercontroller.receivenotification') {
|
|
|
|
|
return 'cloud_federation_api.requesthandler.receivenotification';
|
|
|
|
|
}
|
|
|
|
|
return $routeName;
|
|
|
|
|
}
|
|
|
|
|