summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib/Expiration.php
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2019-11-04 18:18:32 +0100
committerGitHub <noreply@github.com>2019-11-04 18:18:32 +0100
commit13960b69da2593dcfb0cbaef222ee8b9a33142c0 (patch)
treeca43ed0f4daa75e6b03b137b3ad650c8b721efa7 /apps/files_trashbin/lib/Expiration.php
parent64bfd4bbeb10e07bd2133a97c50175a156d43d61 (diff)
parent964dc0a95520efbf876e0113bfafc294f4f4b322 (diff)
downloadnextcloud-server-13960b69da2593dcfb0cbaef222ee8b9a33142c0.tar.gz
nextcloud-server-13960b69da2593dcfb0cbaef222ee8b9a33142c0.zip
Merge pull request #17509 from nextcloud/fix/application-singleton
Fix Application instances created multiple times
Diffstat (limited to 'apps/files_trashbin/lib/Expiration.php')
-rw-r--r--apps/files_trashbin/lib/Expiration.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files_trashbin/lib/Expiration.php b/apps/files_trashbin/lib/Expiration.php
index c7ad4e29f18..933375c9537 100644
--- a/apps/files_trashbin/lib/Expiration.php
+++ b/apps/files_trashbin/lib/Expiration.php
@@ -49,7 +49,11 @@ class Expiration {
public function __construct(IConfig $config,ITimeFactory $timeFactory){
$this->timeFactory = $timeFactory;
- $this->retentionObligation = $config->getSystemValue('trashbin_retention_obligation', 'auto');
+ $this->setRetentionObligation($config->getSystemValue('trashbin_retention_obligation', 'auto'));
+ }
+
+ public function setRetentionObligation(string $obligation) {
+ $this->retentionObligation = $obligation;
if ($this->retentionObligation !== 'disabled') {
$this->parseRetentionObligation();