diff options
author | TimObert <tobert@w-commerce.de> | 2020-02-14 14:12:01 +0100 |
---|---|---|
committer | Tim Obert <tobert@w-commerce.de> | 2020-02-14 14:16:31 +0100 |
commit | 4c1834daced86f114b3c810e4c4ce08fc0790adc (patch) | |
tree | aa9a95ed7e0e6d98f22706b1ba51da6ed0b85cc0 /lib | |
parent | 058180d386903f2aac27306db90a39da993a3915 (diff) | |
download | nextcloud-server-4c1834daced86f114b3c810e4c4ce08fc0790adc.tar.gz nextcloud-server-4c1834daced86f114b3c810e4c4ce08fc0790adc.zip |
Fix requested changes
Signed-off-by: Tim Obert <tobert@w-commerce.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/public/AppFramework/AuthPublicShareController.php | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/lib/public/AppFramework/AuthPublicShareController.php b/lib/public/AppFramework/AuthPublicShareController.php index 969fd0bfe60..9e8daa8d34e 100644 --- a/lib/public/AppFramework/AuthPublicShareController.php +++ b/lib/public/AppFramework/AuthPublicShareController.php @@ -156,15 +156,6 @@ 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 @@ -172,7 +163,11 @@ abstract class AuthPublicShareController extends PublicShareController { private function getRoute(string $function): string { $app = strtolower($this->appName); $class = (new \ReflectionClass($this))->getShortName(); - // $class = $this->camelCaseToLowerCaseUnderscored(substr($class, 0, strpos($class, 'Controller'))); + if ($this->appName === 'files_sharing') { + $class = strtolower($class); + } else if (substr($class, -10) === 'Controller') { + $class = substr($class, 0, -10); + } return $app .'.'. $class .'.'. $function; } |