Merge branch 'master' into files_encryption
This commit is contained in:
commit
23db814cbd
1 changed files with 13 additions and 0 deletions
|
@ -465,6 +465,13 @@ class Share {
|
||||||
null,
|
null,
|
||||||
1);
|
1);
|
||||||
if ($item) {
|
if ($item) {
|
||||||
|
// Pass all the vars we have for now, they may be useful
|
||||||
|
\OC_Hook::emit('OCP\Share', 'pre_unshare', array(
|
||||||
|
'itemType' => $itemType,
|
||||||
|
'itemSource' => $itemSource,
|
||||||
|
'shareType' => $shareType,
|
||||||
|
'shareWith' => $shareWith,
|
||||||
|
));
|
||||||
self::delete($item['id']);
|
self::delete($item['id']);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -480,6 +487,12 @@ class Share {
|
||||||
public static function unshareAll($itemType, $itemSource) {
|
public static function unshareAll($itemType, $itemSource) {
|
||||||
$shares = self::getItemShared($itemType, $itemSource);
|
$shares = self::getItemShared($itemType, $itemSource);
|
||||||
if ($shares) {
|
if ($shares) {
|
||||||
|
// Pass all the vars we have for now, they may be useful
|
||||||
|
\OC_Hook::emit('OCP\Share', 'pre_unshareAll', array(
|
||||||
|
'itemType' => $itemType,
|
||||||
|
'itemSource' => $itemSource,
|
||||||
|
'shares' => $shares
|
||||||
|
));
|
||||||
foreach ($shares as $share) {
|
foreach ($shares as $share) {
|
||||||
self::delete($share['id']);
|
self::delete($share['id']);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue