Skip to content
Snippets Groups Projects
Unverified Commit f885cef5 authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by GitHub
Browse files

Merge pull request #19478 from Tim-Obert/bug/19475/fix-routes-generation-authpublicsharecontroller

Change the route generation of AuthPublicShareController.php
parents baf386b5 4c1834da
No related branches found
No related tags found
No related merge requests found
...@@ -156,14 +156,19 @@ abstract class AuthPublicShareController extends PublicShareController { ...@@ -156,14 +156,19 @@ abstract class AuthPublicShareController extends PublicShareController {
); );
} }
/** /**
* @since 14.0.0 * @since 14.0.0
*/ */
private function getRoute(string $function): string { private function getRoute(string $function): string {
$app = strtolower($this->appName); $app = strtolower($this->appName);
$class = strtolower((new \ReflectionClass($this))->getShortName()); $class = (new \ReflectionClass($this))->getShortName();
if ($this->appName === 'files_sharing') {
return $app . '.' . $class . '.' . $function; $class = strtolower($class);
} else if (substr($class, -10) === 'Controller') {
$class = substr($class, 0, -10);
}
return $app .'.'. $class .'.'. $function;
} }
/** /**
......
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