Merge pull request #27326 from nextcloud/stable-19-backport-27024

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

View file

@ -295,15 +295,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',
]
);
}
}
/**