summaryrefslogtreecommitdiffstats
path: root/lib/private/Share
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-11-29 22:38:19 +0100
committerMorris Jobke <hey@morrisjobke.de>2020-11-29 23:28:16 +0100
commit6564a95160426729a43f18d3a1d66a12d8b33498 (patch)
tree08a702323778cbfda86fe76abc5b7cf45fea4bed /lib/private/Share
parent10e5ae5e1813c7c9dc844008a0df8b47232dc616 (diff)
downloadnextcloud-server-6564a95160426729a43f18d3a1d66a12d8b33498.tar.gz
nextcloud-server-6564a95160426729a43f18d3a1d66a12d8b33498.zip
Remove now unused methods in Share.php due to the reduced code complexity in Share::getItems
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/Share')
-rw-r--r--lib/private/Share/Share.php36
1 files changed, 0 insertions, 36 deletions
diff --git a/lib/private/Share/Share.php b/lib/private/Share/Share.php
index 402b0abebb6..eb1ba2135b8 100644
--- a/lib/private/Share/Share.php
+++ b/lib/private/Share/Share.php
@@ -292,42 +292,6 @@ class Share extends Constants {
}
/**
- * Checks whether a share has expired, calls unshareItem() if yes.
- * @param array $item Share data (usually database row)
- * @return boolean True if item was expired, false otherwise.
- */
- protected static function expireItem(array $item) {
- $result = false;
-
- // only use default expiration date for link shares
- if ((int) $item['share_type'] === IShare::TYPE_LINK) {
-
- // calculate expiration date
- if (!empty($item['expiration'])) {
- $userDefinedExpire = new \DateTime($item['expiration']);
- $expires = $userDefinedExpire->getTimestamp();
- } else {
- $expires = null;
- }
-
-
- // get default expiration settings
- $defaultSettings = Helper::getDefaultExpireSetting();
- $expires = Helper::calculateExpireDate($defaultSettings, $item['stime'], $expires);
-
-
- if (is_int($expires)) {
- $now = time();
- if ($now > $expires) {
- self::unshareItem($item);
- $result = true;
- }
- }
- }
- return $result;
- }
-
- /**
* Unshares a share given a share data array
* @param array $item Share data (usually database row)
* @param int $newParent parent ID