diff options
Diffstat (limited to 'lib/public/AppFramework')
-rw-r--r-- | lib/public/AppFramework/AuthPublicShareController.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/public/AppFramework/AuthPublicShareController.php b/lib/public/AppFramework/AuthPublicShareController.php index 09337ad101c..969fd0bfe60 100644 --- a/lib/public/AppFramework/AuthPublicShareController.php +++ b/lib/public/AppFramework/AuthPublicShareController.php @@ -157,13 +157,23 @@ abstract class AuthPublicShareController extends PublicShareController { } /** + * @param $string + * @return string + */ + private function camelCaseToLowerCaseUnderscored($string) + { + $value = preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $string); + return mb_strtolower($value, 'utf-8'); + } + + /** * @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(); + // $class = $this->camelCaseToLowerCaseUnderscored(substr($class, 0, strpos($class, 'Controller'))); + return $app .'.'. $class .'.'. $function; } /** |