diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-04-28 10:58:50 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-04-28 10:58:50 +0200 |
commit | de8c15e1a46e33a20af1bad97a8cf27fced84539 (patch) | |
tree | 36a46b15dcf68d2d5feea06d7b57f4b8701321f5 /lib/private/share | |
parent | 5fa5f46a88371322fa37e1e34ebc73ccea6c42b1 (diff) | |
parent | 5304afbecb37b841312e35594ef8cba403a4cd8c (diff) | |
download | nextcloud-server-de8c15e1a46e33a20af1bad97a8cf27fced84539.tar.gz nextcloud-server-de8c15e1a46e33a20af1bad97a8cf27fced84539.zip |
Merge pull request #14764 from owncloud/shared-etag-propagate
Propagate etags across shared storages
Diffstat (limited to 'lib/private/share')
-rw-r--r-- | lib/private/share/share.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php index f1a1fbdd101..617eeeb9d90 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -2530,4 +2530,28 @@ class Share extends Constants { $enforcePassword = $config->getAppValue('core', 'shareapi_enforce_links_password', 'no'); return ($enforcePassword === "yes") ? true : false; } + + /** + * Get all share entries, including non-unique group items + * + * @param string $owner + * @return array + */ + public static function getAllSharesForOwner($owner) { + $query = 'SELECT * FROM `*PREFIX*share` WHERE `uid_owner` = ?'; + $result = \OC::$server->getDatabaseConnection()->executeQuery($query, [$owner]); + 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(); + } } |