-
-
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
[stable27] fix: avoid douple expireDate
parsing
#44911
Conversation
… logger Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
`expireDate` can be set once and used anywhere needed, the current implementation, duplicates this behavior which leads to `parseDate` receiving an a date object it parsed and returend earlier in the createShare method. Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
1319b22
to
c902c22
Compare
@@ -138,22 +114,11 @@ | |||
IUserStatusManager $userStatusManager, | |||
IPreview $previewManager, | |||
private IDateTimeZone $dateTimeZone, | |||
private LoggerInterface $logger, | |||
?string $userId = null |
Check failure
Code scanning / Psalm
DuplicateParam Error
$expireDate = $this->parseDate($expireDate); | ||
$share->setExpirationDate($expireDate); | ||
} catch (\Exception $e) { | ||
throw new OCSNotFoundException($this->l->t('Invalid date, date format must be YYYY-MM-DD')); |
Check failure
Code scanning / Psalm
UndefinedThisPropertyFetch Error
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.
Some update needs need to made as the backport is not totally graceful
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.
This actually breaks Talk attachment:
https://github.com/nextcloud/spreed/actions/runs/8736657894/job/23972035833?pr=12147
//Expire date | ||
if ($expireDate !== '') { | ||
try { | ||
$expireDate = $this->parseDate($expireDate); |
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.
Needs #44916 otherwise it breaks opencloudmesh, deck and talk
Would backport #44912 [Same original PR but from stable28] |
Backport of #44838
Warning, This backport's changes differ from the original and might be incomplete⚠️
Todo
Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.