summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/appinfo/app.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/appinfo/app.php')
-rw-r--r--apps/files_sharing/appinfo/app.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php
index ea3a9da6f7a..bbb753d5e69 100644
--- a/apps/files_sharing/appinfo/app.php
+++ b/apps/files_sharing/appinfo/app.php
@@ -1,15 +1,20 @@
<?php
-require_once('apps/files_sharing/sharedstorage.php');
-
OC::$CLASSPATH['OC_Share'] = "apps/files_sharing/lib_share.php";
+OC::$CLASSPATH['OC_Filestorage_Shared'] = "apps/files_sharing/sharedstorage.php";
+
OCP\App::registerAdmin('files_sharing', 'settings');
+
+OCP\Util::connectHook('OC_Filesystem', 'setup', 'OC_Filestorage_Shared', 'setup');
+
OCP\Util::connectHook("OC_Filesystem", "post_delete", "OC_Share", "deleteItem");
OCP\Util::connectHook("OC_Filesystem", "post_rename", "OC_Share", "renameItem");
OCP\Util::connectHook("OC_Filesystem", "post_write", "OC_Share", "updateItem");
+
OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OC_Share', 'removeUser');
OCP\Util::connectHook('OC_User', 'post_addToGroup', 'OC_Share', 'addToGroupShare');
OCP\Util::connectHook('OC_User', 'post_removeFromGroup', 'OC_Share', 'removeFromGroupShare');
+
$dir = isset($_GET['dir']) ? $_GET['dir'] : '/';
if ($dir != '/Shared' || OCP\Config::getAppValue('files_sharing', 'resharing', 'yes') == 'yes') {
OCP\Util::addscript("files_sharing", "share");