summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTim Obert <tobert@w-commerce.de>2020-02-14 12:12:04 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-02-23 15:45:40 +0000
commit1e81fc2dbe66dae2e9a80ef8fb40eb4934ce02b8 (patch)
treedcd5f468687ceaad17f75fac1433d34ebf0a8aec /lib
parent51d75fc7ae04bda508861fa16cab78e3177fa1b0 (diff)
downloadnextcloud-server-1e81fc2dbe66dae2e9a80ef8fb40eb4934ce02b8.tar.gz
nextcloud-server-1e81fc2dbe66dae2e9a80ef8fb40eb4934ce02b8.zip
Change the route generation of AuthPublicShareController.php and adjust the routes for file sharing
Signed-off-by: Tim Obert <tobert@w-commerce.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/public/AppFramework/AuthPublicShareController.php16
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;
}
/**