diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-03-09 16:20:18 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-04-27 14:07:15 +0200 |
commit | 30ad56813a16908e3862c353256f2a6d0f05fe3a (patch) | |
tree | 284153f54d9ad64f377602c2ce6b2dc83f3cc445 /lib | |
parent | 518d5aadf51318886481696e4308fcc39684b508 (diff) | |
download | nextcloud-server-30ad56813a16908e3862c353256f2a6d0f05fe3a.tar.gz nextcloud-server-30ad56813a16908e3862c353256f2a6d0f05fe3a.zip |
propagate etags for all user of a share
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/share/share.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php index 63bba06e67c..d18bdffc697 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -2518,6 +2518,7 @@ class Share extends \OC\Share\Constants { $enforcePassword = $config->getAppValue('core', 'shareapi_enforce_links_password', 'no'); return ($enforcePassword === "yes") ? true : false; } + /** * Get all share entries, including non-unique group items * @@ -2530,4 +2531,15 @@ class Share extends \OC\Share\Constants { return $result->fetchAll(); } + /** + * Get all share entries, including non-unique group items for a file + * + * @param int $id + * @return array + */ + public static function getAllSharesForFileId($id) { + $query = 'SELECT * FROM `*PREFIX*share` WHERE `file_source` = ?'; + $result = \OC::$server->getDatabaseConnection()->executeQuery($query, [$id]); + return $result->fetchAll(); + } } |