summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-11-27 17:22:48 +0100
committerVincent Petry <pvince81@owncloud.com>2013-11-27 17:22:48 +0100
commitd2840a045d8d4e5996c847e8bbf93e80c111fdac (patch)
tree2ea166adec5f17d85e36e84faa676422e5b8527d /apps
parent5d2299eab8bc11c814a0fc352fa65687a3711869 (diff)
downloadnextcloud-server-d2840a045d8d4e5996c847e8bbf93e80c111fdac.tar.gz
nextcloud-server-d2840a045d8d4e5996c847e8bbf93e80c111fdac.zip
Fixed sharing hook to not remove the share before the trashbin
Fixed the hook order between sharing app and trashbin
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/appinfo/app.php1
-rw-r--r--apps/files_sharing/lib/updater.php7
2 files changed, 7 insertions, 1 deletions
diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php
index bdaea64bb90..217bc005faf 100644
--- a/apps/files_sharing/appinfo/app.php
+++ b/apps/files_sharing/appinfo/app.php
@@ -14,6 +14,7 @@ OCP\Share::registerBackend('file', 'OC_Share_Backend_File');
OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file');
OCP\Util::addScript('files_sharing', 'share');
\OC_Hook::connect('OC_Filesystem', 'post_write', '\OC\Files\Cache\Shared_Updater', 'writeHook');
+\OC_Hook::connect('OC_Filesystem', 'post_delete', '\OC\Files\Cache\Shared_Updater', 'postDeleteHook');
\OC_Hook::connect('OC_Filesystem', 'delete', '\OC\Files\Cache\Shared_Updater', 'deleteHook');
\OC_Hook::connect('OC_Filesystem', 'post_rename', '\OC\Files\Cache\Shared_Updater', 'renameHook');
\OC_Hook::connect('OCP\Share', 'post_shared', '\OC\Files\Cache\Shared_Updater', 'shareHook');
diff --git a/apps/files_sharing/lib/updater.php b/apps/files_sharing/lib/updater.php
index 171999ea652..0c35b18c42b 100644
--- a/apps/files_sharing/lib/updater.php
+++ b/apps/files_sharing/lib/updater.php
@@ -89,9 +89,14 @@ class Shared_Updater {
*/
static public function deleteHook($params) {
self::correctFolders($params['path']);
- self::removeShare($params['path']);
}
+ /**
+ * @param array $params
+ */
+ static public function postDeleteHook($params) {
+ self::removeShare($params['path']);
+ }
/**
* @param array $params