Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/private/Share20/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ protected function validateExpirationDateInternal(IShare $share) {
* @throws \InvalidArgumentException
* @throws \Exception
*/
protected function validateExpirationDate(IShare $share) {
protected function validateExpirationDateLink(IShare $share) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
protected function validateExpirationDateLink(IShare $share) {
protected function validateLinkExpirationDate(IShare $share) {

if that makes it a tad clearer. just an idea :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the other one is called validateLinkExpirationDateInternal so I'd have to rename it also everywhere...
nah... another time, but thanks for the suggestion

$expirationDate = $share->getExpirationDate();

if ($expirationDate !== null) {
Expand Down Expand Up @@ -763,7 +763,7 @@ public function createShare(IShare $share) {
);

//Verify the expiration date
$share = $this->validateExpirationDate($share);
$share = $this->validateExpirationDateLink($share);

//Verify the password
$this->verifyPassword($share->getPassword());
Expand Down Expand Up @@ -975,15 +975,15 @@ public function updateShare(IShare $share) {

if ($share->getExpirationDate() != $originalShare->getExpirationDate()) {
//Verify the expiration date
$this->validateExpirationDate($share);
$this->validateExpirationDateInternal($share);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the actual fix

$expirationDateUpdated = true;
}
} elseif ($share->getShareType() === IShare::TYPE_GROUP) {
$this->groupCreateChecks($share);

if ($share->getExpirationDate() != $originalShare->getExpirationDate()) {
//Verify the expiration date
$this->validateExpirationDate($share);
$this->validateExpirationDateInternal($share);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here

$expirationDateUpdated = true;
}
} elseif ($share->getShareType() === IShare::TYPE_LINK) {
Expand All @@ -999,7 +999,7 @@ public function updateShare(IShare $share) {

if ($share->getExpirationDate() != $originalShare->getExpirationDate()) {
//Verify the expiration date
$this->validateExpirationDate($share);
$this->validateExpirationDateLink($share);
$expirationDateUpdated = true;
}
} elseif ($share->getShareType() === IShare::TYPE_EMAIL) {
Expand Down
Loading