summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-01-17 14:47:29 +0100
committerRobin Appelman <icewind@owncloud.com>2014-01-17 14:47:29 +0100
commit5cb08bb9cb6cf603d47a124ffa0ea60881f7de51 (patch)
tree89ac0ff4115dc175cb79b35b4df837dab3f7df45 /lib/public
parent299bb4d99db935bb529a30fe6ae0c9bc72344d69 (diff)
parentdb353e14cce316b271d3bfcfdbc6989e146d4517 (diff)
downloadnextcloud-server-5cb08bb9cb6cf603d47a124ffa0ea60881f7de51.tar.gz
nextcloud-server-5cb08bb9cb6cf603d47a124ffa0ea60881f7de51.zip
Merge branch 'master' into fileinfo
Conflicts: tests/lib/files/cache/cache.php
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/share.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/public/share.php b/lib/public/share.php
index f0fd8e1ab1b..eb1dd8d1c95 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -655,7 +655,15 @@ class Share {
* @return Returns true on success or false on failure
*/
public static function unshareAll($itemType, $itemSource) {
- if ($shares = self::getItemShared($itemType, $itemSource)) {
+ // Get all of the owners of shares of this item.
+ $query = \OC_DB::prepare( 'SELECT `uid_owner` from `*PREFIX*share` WHERE `item_type`=? AND `item_source`=?' );
+ $result = $query->execute(array($itemType, $itemSource));
+ $shares = array();
+ // Add each owner's shares to the array of all shares for this item.
+ while ($row = $result->fetchRow()) {
+ $shares = array_merge($shares, self::getItems($itemType, $itemSource, null, null, $row['uid_owner']));
+ }
+ if (!empty($shares)) {
// Pass all the vars we have for now, they may be useful
$hookParams = array(
'itemType' => $itemType,