-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix(files_sharing): file request followups #46589
Conversation
* @param View $view | ||
*/ | ||
public function setView($view) { | ||
public function setView(View $view) { |
Check notice
Code scanning / Psalm
MissingReturnType Note
apps/files_sharing/lib/Listener/LoadPublicFileRequestAuthListener.php
Dismissed
Show dismissed
Hide dismissed
c8e6edd
to
45c9298
Compare
@@ -16,16 +19,13 @@ | |||
*/ | |||
class FilesDropPlugin extends ServerPlugin { | |||
|
|||
/** @var View */ | |||
private $view; | |||
private View $view; |
Check notice
Code scanning / Psalm
MissingConstructor Note
} | ||
|
||
// We need a valid nickname for file requests | ||
if ($isFileRequest && (!$nickName || trim($nickName) === '')) { |
Check notice
Code scanning / Psalm
RiskyTruthyFalsyComparison Note
// If this is a file request we need to create a folder for the user | ||
if ($isFileRequest) { | ||
// Check if the folder already exists | ||
if (!$this->view->file_exists($nickName)) { |
Check notice
Code scanning / Psalm
RiskyTruthyFalsyComparison Note
71f5f64
to
cb95dc9
Compare
// If this is a file request we need to create a folder for the user | ||
if ($isFileRequest) { | ||
// Check if the folder already exists | ||
if (!$this->view->file_exists($nickName) === true) { |
Check notice
Code scanning / Psalm
RiskyTruthyFalsyComparison Note
// If this is a file request we need to create a folder for the user | ||
if ($isFileRequest) { | ||
// Check if the folder already exists | ||
if (!$this->view->file_exists($nickName) === true) { |
Check notice
Code scanning / Psalm
PossiblyNullReference Note
cb95dc9
to
bcc8923
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
} | ||
|
||
// If this is a file request we need to create a folder for the user | ||
if ($isFileRequest && $nickName !== null) { |
Check failure
Code scanning / Psalm
RedundantCondition Error
// If this is a file request we need to create a folder for the user | ||
if ($isFileRequest && $nickName !== null) { | ||
// Check if the folder already exists | ||
if (!($this->view->file_exists($nickName) === true)) { |
Check notice
Code scanning / Psalm
PossiblyNullReference Note
bcc8923
to
6051047
Compare
a5a34b0
to
f5871b1
Compare
$shareManager = \OCP\Server::get(IManager::class); | ||
$token = $this->getToken($request); | ||
$share = $shareManager->getShareByToken($token); | ||
if ($share === null) { |
Check notice
Code scanning / Psalm
DocblockTypeContradiction Note
$isFileRequest = false; | ||
try { | ||
$share = $this->shareManager->getShareByToken($token); | ||
if ($share === null) { |
Check notice
Code scanning / Psalm
DocblockTypeContradiction Note
…ttings Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
…isplay Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
…available Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
25911a3
to
98f17a1
Compare
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
…vent Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
98f17a1
to
481551e
Compare
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
e578a8c
to
725736a
Compare
Sans.titre.mp4
Todo
Followups