[Pkg-owncloud-commits] [owncloud] 210/239: Fixed sharing hook to not remove the share before the trashbin

David Prévot taffit at moszumanska.debian.org
Fri Nov 29 01:32:39 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit d2840a045d8d4e5996c847e8bbf93e80c111fdac
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Wed Nov 27 17:22:48 2013 +0100

    Fixed sharing hook to not remove the share before the trashbin
    
    Fixed the hook order between sharing app and trashbin
---
 apps/files_sharing/appinfo/app.php | 1 +
 apps/files_sharing/lib/updater.php | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php
index bdaea64..217bc00 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 171999e..0c35b18 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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list