Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2021-05-19 14:04:34 +0300
committerGitHub <noreply@github.com>2021-05-19 14:04:34 +0300
commitfd284f428dc15c0ebd4054fa5e4e9431d518bcb1 (patch)
treee54c3f60e32d692c454d34056abff2dff545ab49
parent7a0cd9da7c3b7a94f93bae6ac29b390781c4dea9 (diff)
parentc728b1f0703b832c1cb69f4b296c405874bbeb4d (diff)
Merge pull request #27024 from nextcloud/enh/audit_log/expiration_date_removal
Properly log expiration date removal in audit log
-rw-r--r--apps/admin_audit/lib/Actions/Sharing.php29
1 files changed, 20 insertions, 9 deletions
diff --git a/apps/admin_audit/lib/Actions/Sharing.php b/apps/admin_audit/lib/Actions/Sharing.php
index fb070c565a7..472e4203110 100644
--- a/apps/admin_audit/lib/Actions/Sharing.php
+++ b/apps/admin_audit/lib/Actions/Sharing.php
@@ -320,15 +320,26 @@ class Sharing extends Action {
* @param array $params
*/
public function updateExpirationDate(array $params): void {
- $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 changed 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',
+ ]
+ );
+ }
}
/**