Move hook connectors from shared storage to app.php, add post_unshare hook

This commit is contained in:
Michael Gapczynski 2013-03-05 21:57:32 -05:00
parent 4dcbaa1d7b
commit 771e01af35
2 changed files with 5 additions and 4 deletions

View file

@ -11,3 +11,8 @@ OCP\Util::connectHook('OC_Filesystem', 'setup', '\OC\Files\Storage\Shared', 'set
OCP\Share::registerBackend('file', 'OC_Share_Backend_File'); OCP\Share::registerBackend('file', 'OC_Share_Backend_File');
OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file'); OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file');
OCP\Util::addScript('files_sharing', 'share'); 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', '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');
\OC_Hook::connect('OCP\Share', 'post_unshare', '\OC\Files\Cache\Shared_Updater', 'shareHook');

View file

@ -417,10 +417,6 @@ class Shared extends \OC\Files\Storage\Common {
\OC\Files\Filesystem::mount('\OC\Files\Storage\Shared', \OC\Files\Filesystem::mount('\OC\Files\Storage\Shared',
array('sharedFolder' => '/Shared'), array('sharedFolder' => '/Shared'),
$user_dir.'/Shared/'); $user_dir.'/Shared/');
\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', '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');
} }
} }