Merge pull request #19611 from nextcloud/backport/19478/stable17

[stable17] Change the route generation of AuthPublicShareController.php
This commit is contained in:
Roeland Jago Douma 2020-02-24 20:00:18 +01:00 committed by GitHub
commit b68b673ea9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}
/**