Properly log expiration date removal in audit log

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
pull/27324/head
Roeland Jago Douma 2021-05-19 10:09:48 +07:00 committed by Lukas Reschke
parent 25c24c2b6e
commit 6300a1b846
1 changed files with 20 additions and 9 deletions

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