diff options
author | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2015-08-11 22:21:32 +0300 |
---|---|---|
committer | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2015-09-16 17:37:21 +0300 |
commit | 8ac3d5e36c7d628f1ba4d27c68d54786eed972b2 (patch) | |
tree | d6037ab97eff31a02ede7697074ff853cc258a9e /apps/files_trashbin/lib/expiration.php | |
parent | a1e343ae7ce69fd8dd39e4d58e172c00d1992cbd (diff) | |
download | nextcloud-server-8ac3d5e36c7d628f1ba4d27c68d54786eed972b2.tar.gz nextcloud-server-8ac3d5e36c7d628f1ba4d27c68d54786eed972b2.zip |
Add expiration cronjob
Diffstat (limited to 'apps/files_trashbin/lib/expiration.php')
-rw-r--r-- | apps/files_trashbin/lib/expiration.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/files_trashbin/lib/expiration.php b/apps/files_trashbin/lib/expiration.php index 138540febf8..c8a6abb627b 100644 --- a/apps/files_trashbin/lib/expiration.php +++ b/apps/files_trashbin/lib/expiration.php @@ -105,6 +105,15 @@ class Expiration { return $isOlderThanMax || $isMinReached; } + public function getMaxAgeAsTimestamp(){ + $maxAge = false; + if ($this->isEnabled() && $this->maxAge !== self::NO_OBLIGATION) { + $time = $this->timeFactory->getTime(); + $maxAge = $time - ($this->maxAge * 86400); + } + return $maxAge; + } + private function parseRetentionObligation(){ $splitValues = explode(',', $this->retentionObligation); if (!isset($splitValues[0])) { |