-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Refactor core/Controller #39212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor core/Controller #39212
Changes from 5 commits
f48db5a
51040b1
be9e908
7e4ca27
dbda422
8913eb8
f24dc3f
bc5dbd2
1c942b4
2302df8
ee576ef
b169a24
f2b03d1
cd4bbc5
c54a665
dde0ef7
78a0f52
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -27,15 +27,19 @@ | |||||||||||||||||||||
| */ | ||||||||||||||||||||||
| namespace OC\Core\Controller; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| use OC\User\NoUserException; | ||||||||||||||||||||||
| use OCA\Files_Sharing\SharedStorage; | ||||||||||||||||||||||
| use OCP\AppFramework\Controller; | ||||||||||||||||||||||
| use OCP\AppFramework\Http; | ||||||||||||||||||||||
| use OCP\AppFramework\Http\DataResponse; | ||||||||||||||||||||||
| use OCP\AppFramework\Http\FileDisplayResponse; | ||||||||||||||||||||||
| use OCP\AppFramework\Http\Response; | ||||||||||||||||||||||
| use OCP\Files\File; | ||||||||||||||||||||||
| use OCP\Files\InvalidPathException; | ||||||||||||||||||||||
| use OCP\Files\IRootFolder; | ||||||||||||||||||||||
| use OCP\Files\Node; | ||||||||||||||||||||||
| use OCP\Files\NotFoundException; | ||||||||||||||||||||||
| use OCP\Files\NotPermittedException; | ||||||||||||||||||||||
| use OCP\IPreview; | ||||||||||||||||||||||
| use OCP\IRequest; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
@@ -54,7 +58,9 @@ public function __construct( | |||||||||||||||||||||
| * @NoAdminRequired | ||||||||||||||||||||||
| * @NoCSRFRequired | ||||||||||||||||||||||
| * | ||||||||||||||||||||||
| * @return DataResponse|FileDisplayResponse | ||||||||||||||||||||||
| * @return Response | ||||||||||||||||||||||
| * @throws NotPermittedException | ||||||||||||||||||||||
| * @throws NoUserException | ||||||||||||||||||||||
| */ | ||||||||||||||||||||||
| public function getPreview( | ||||||||||||||||||||||
| string $file = '', | ||||||||||||||||||||||
|
|
@@ -81,15 +87,23 @@ public function getPreview( | |||||||||||||||||||||
| * @NoAdminRequired | ||||||||||||||||||||||
| * @NoCSRFRequired | ||||||||||||||||||||||
| * | ||||||||||||||||||||||
| * @param int $fileId | ||||||||||||||||||||||
| * @param int $x | ||||||||||||||||||||||
| * @param int $y | ||||||||||||||||||||||
| * @param bool $a | ||||||||||||||||||||||
| * @param bool $forceIcon | ||||||||||||||||||||||
| * @param string $mode | ||||||||||||||||||||||
| * @return DataResponse|FileDisplayResponse | ||||||||||||||||||||||
| * @throws NoUserException | ||||||||||||||||||||||
| * @throws NotPermittedException | ||||||||||||||||||||||
|
||||||||||||||||||||||
| * | |
| * @param int $fileId | |
| * @param int $x | |
| * @param int $y | |
| * @param bool $a | |
| * @param bool $forceIcon | |
| * @param string $mode | |
| * @return DataResponse|FileDisplayResponse | |
| * @throws NoUserException | |
| * @throws NotPermittedException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See this
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * @param Node $node | |
| * @param int $x | |
| * @param int $y | |
| * @param bool $a | |
| * @param bool $forceIcon | |
| * @param string $mode | |
| * @return Response | |
| * @throws NotFoundException | |
| * @throws InvalidPathException | |
| * @return DataResponse|FileDisplayResponse |
or you remove the whole doc block and change the end of the signature to:
string $mode) : DataResponse|FileDisplayResponse {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See this
Uh oh!
There was an error while loading. Please reload this page.