summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorFlorin Peter <github@florin-peter.de>2013-05-17 01:20:02 +0200
committerFlorin Peter <github@florin-peter.de>2013-05-17 01:20:02 +0200
commita92dead7540c73b43162dd1993d07bf542cdfabe (patch)
treec3443f272a44e4a3d9d285afa004069d23a4c6f8 /lib/base.php
parent469d6028ad10c9b39bffca9019d2c1fd9bdb0e3d (diff)
downloadnextcloud-server-a92dead7540c73b43162dd1993d07bf542cdfabe.tar.gz
nextcloud-server-a92dead7540c73b43162dd1993d07bf542cdfabe.zip
only connect share hooks if installation OC is installed
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/base.php b/lib/base.php
index 667202d3aef..7d7e690aa6f 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -542,10 +542,12 @@ class OC {
* register hooks for sharing
*/
public static function registerShareHooks() {
- OC_Hook::connect('OC_User', 'post_deleteUser', 'OCP\Share', 'post_deleteUser');
- OC_Hook::connect('OC_User', 'post_addToGroup', 'OCP\Share', 'post_addToGroup');
- OC_Hook::connect('OC_User', 'post_removeFromGroup', 'OCP\Share', 'post_removeFromGroup');
- OC_Hook::connect('OC_User', 'post_deleteGroup', 'OCP\Share', 'post_deleteGroup');
+ if(\OC_Config::getValue('installed')) {
+ OC_Hook::connect('OC_User', 'post_deleteUser', 'OCP\Share', 'post_deleteUser');
+ OC_Hook::connect('OC_User', 'post_addToGroup', 'OCP\Share', 'post_addToGroup');
+ OC_Hook::connect('OC_User', 'post_removeFromGroup', 'OCP\Share', 'post_removeFromGroup');
+ OC_Hook::connect('OC_User', 'post_deleteGroup', 'OCP\Share', 'post_deleteGroup');
+ }
}
/**