Skip to content

Commit b68b673

Browse files
authored
Merge pull request #19611 from nextcloud/backport/19478/stable17
[stable17] Change the route generation of AuthPublicShareController.php
2 parents 97debae + 2f63533 commit b68b673

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

lib/public/AppFramework/AuthPublicShareController.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,19 @@ final public function getAuthenticationRedirect(string $redirect): RedirectRespo
156156
);
157157
}
158158

159+
159160
/**
160161
* @since 14.0.0
161162
*/
162163
private function getRoute(string $function): string {
163164
$app = strtolower($this->appName);
164-
$class = strtolower((new \ReflectionClass($this))->getShortName());
165-
166-
return $app . '.' . $class . '.' . $function;
165+
$class = (new \ReflectionClass($this))->getShortName();
166+
if ($this->appName === 'files_sharing') {
167+
$class = strtolower($class);
168+
} else if (substr($class, -10) === 'Controller') {
169+
$class = substr($class, 0, -10);
170+
}
171+
return $app .'.'. $class .'.'. $function;
167172
}
168173

169174
/**

0 commit comments

Comments
 (0)