summaryrefslogtreecommitdiffstats
path: root/lib/private/share
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-19 06:59:58 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-19 06:59:58 +0200
commit1773dcbef2fbf7a1285a985894acc0387f7da2ee (patch)
tree2955f5ebb5c5c6678a9bc6f97c30bb606bb7c66d /lib/private/share
parent00ad23f3c1a3e08f4ac4c0108cf79add3a808302 (diff)
parent6144ced7a09356a0aaa70cdc359613d3abf8d28e (diff)
downloadnextcloud-server-1773dcbef2fbf7a1285a985894acc0387f7da2ee.tar.gz
nextcloud-server-1773dcbef2fbf7a1285a985894acc0387f7da2ee.zip
Merge pull request #23973 from owncloud/share_move_post_delete_from_group_hook
Move post_removeFromGroup to shareManager
Diffstat (limited to 'lib/private/share')
-rw-r--r--lib/private/share/hooks.php46
1 files changed, 0 insertions, 46 deletions
diff --git a/lib/private/share/hooks.php b/lib/private/share/hooks.php
deleted file mode 100644
index 5faf81c5e9b..00000000000
--- a/lib/private/share/hooks.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin McCorkell <robin@mccorkell.me.uk>
- * @author Roeland Jago Douma <rullzer@owncloud.com>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OC\Share;
-
-class Hooks extends \OC\Share\Constants {
- /**
- * Function that is called after a user is removed from a group. Shares are cleaned up.
- * @param array $arguments
- */
- public static function post_removeFromGroup($arguments) {
- $sql = 'SELECT `id`, `share_type` FROM `*PREFIX*share`'
- .' WHERE (`share_type` = ? AND `share_with` = ?) OR (`share_type` = ? AND `share_with` = ?)';
- $result = \OC_DB::executeAudited($sql, array(self::SHARE_TYPE_GROUP, $arguments['gid'],
- self::$shareTypeGroupUserUnique, $arguments['uid']));
- while ($item = $result->fetchRow()) {
- if ($item['share_type'] == self::SHARE_TYPE_GROUP) {
- // Delete all reshares by this user of the group share
- Helper::delete($item['id'], true, $arguments['uid']);
- } else {
- Helper::delete($item['id']);
- }
- }
- }
-}