Check the expiration date for null
* null is always less than any value -> expirationDate gets null which is "no date set" * ref https://github.com/owncloud/core/issues/20590#issuecomment-158393075
This commit is contained in:
parent
8931ba4a0d
commit
3061e5d2fc
|
@ -2243,7 +2243,13 @@ class Share extends Constants {
|
||||||
} else {
|
} else {
|
||||||
// TODO Don't check if inside folder
|
// TODO Don't check if inside folder
|
||||||
$result['parent'] = $checkReshare['id'];
|
$result['parent'] = $checkReshare['id'];
|
||||||
$result['expirationDate'] = min($expirationDate, $checkReshare['expiration']);
|
|
||||||
|
$result['expirationDate'] = $expirationDate;
|
||||||
|
// $checkReshare['expiration'] could be null and then is always less than any value
|
||||||
|
if(isset($checkReshare['expiration']) && $checkReshare['expiration'] < $expirationDate) {
|
||||||
|
$result['expirationDate'] = $checkReshare['expiration'];
|
||||||
|
}
|
||||||
|
|
||||||
// only suggest the same name as new target if it is a reshare of the
|
// only suggest the same name as new target if it is a reshare of the
|
||||||
// same file/folder and not the reshare of a child
|
// same file/folder and not the reshare of a child
|
||||||
if ($checkReshare[$column] === $itemSource) {
|
if ($checkReshare[$column] === $itemSource) {
|
||||||
|
|
Loading…
Reference in New Issue