summaryrefslogtreecommitdiffstats
path: root/lib/private/Share20/Share.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Share20/Share.php')
-rw-r--r--lib/private/Share20/Share.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/Share20/Share.php b/lib/private/Share20/Share.php
index f9b548c1adf..9ce88b5af22 100644
--- a/lib/private/Share20/Share.php
+++ b/lib/private/Share20/Share.php
@@ -371,6 +371,14 @@ class Share implements \OCP\Share\IShare {
/**
* @inheritdoc
*/
+ public function isExpired() {
+ return $this->getExpirationDate() !== null &&
+ $this->getExpirationDate() <= new \DateTime();
+ }
+
+ /**
+ * @inheritdoc
+ */
public function setSharedBy($sharedBy) {
if (!is_string($sharedBy)) {
throw new \InvalidArgumentException();