Merge pull request #27325 from nextcloud/stable20-backport-27024

[stable20] Properly log expiration date removal in audit log
This commit is contained in:
Morris Jobke 2021-06-07 11:17:00 +02:00 committed by GitHub
commit 0168bef570
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -294,15 +294,26 @@ class Sharing extends Action {
* @param array $params
*/
public function updateExpirationDate(array $params) {
$this->log(
'The expiration date of the publicly shared %s with ID "%s" has been changed to "%s"',
$params,
[
'itemType',
'itemSource',
'date',
]
);
if ($params['date'] === null) {
$this->log(
'The expiration date of the publicly shared %s with ID "%s" has been removed',
$params,
[
'itemType',
'itemSource',
]
);
} else {
$this->log(
'The expiration date of the publicly shared %s with ID "%s" has been changed to "%s"',
$params,
[
'itemType',
'itemSource',
'date',
]
);
}
}
/**