summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-02-23 16:43:31 +0100
committerGitHub <noreply@github.com>2020-02-23 16:43:31 +0100
commitf885cef5370f28571649f4d774541b9fd6f2abc5 (patch)
treec461ed12701d9e1a365f10e557f03bc95eb37f6f /lib
parentbaf386b5d8c8f96993b5c61457281f1921c11ac0 (diff)
parent4c1834daced86f114b3c810e4c4ce08fc0790adc (diff)
downloadnextcloud-server-f885cef5370f28571649f4d774541b9fd6f2abc5.tar.gz
nextcloud-server-f885cef5370f28571649f4d774541b9fd6f2abc5.zip
Merge pull request #19478 from Tim-Obert/bug/19475/fix-routes-generation-authpublicsharecontroller
Change the route generation of AuthPublicShareController.php
Diffstat (limited to 'lib')
-rw-r--r--lib/public/AppFramework/AuthPublicShareController.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/public/AppFramework/AuthPublicShareController.php b/lib/public/AppFramework/AuthPublicShareController.php
index 09337ad101c..9e8daa8d34e 100644
--- a/lib/public/AppFramework/AuthPublicShareController.php
+++ b/lib/public/AppFramework/AuthPublicShareController.php
@@ -156,14 +156,19 @@ abstract class AuthPublicShareController extends PublicShareController {
);
}
+
/**
* @since 14.0.0
*/
private function getRoute(string $function): string {
$app = strtolower($this->appName);
- $class = strtolower((new \ReflectionClass($this))->getShortName());
-
- return $app . '.' . $class . '.' . $function;
+ $class = (new \ReflectionClass($this))->getShortName();
+ if ($this->appName === 'files_sharing') {
+ $class = strtolower($class);
+ } else if (substr($class, -10) === 'Controller') {
+ $class = substr($class, 0, -10);
+ }
+ return $app .'.'. $class .'.'. $function;
}
/**