Fixed sharing hook to not remove the share before the trashbin

Fixed the hook order between sharing app and trashbin
This commit is contained in:
Vincent Petry 2013-11-27 17:22:48 +01:00
parent 5d2299eab8
commit d2840a045d
2 changed files with 7 additions and 1 deletions

View File

@ -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');

View File

@ -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