[Pkg-owncloud-commits] [owncloud] 306/394: move hooks to base.php

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:12:36 UTC 2013


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

taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.

commit c38e71d7e179678b3a138cd6e96ebca899b2271c
Author: Björn Schießle <schiessle at owncloud.com>
Date:   Fri Jan 25 12:29:21 2013 +0100

    move hooks to base.php
---
 lib/base.php                   |    4 ++++
 lib/subadmin.php               |    3 +--
 settings/ajax/removegroup.php  |    1 -
 settings/ajax/removeuser.php   |    1 -
 settings/ajax/togglegroups.php |    1 -
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/base.php b/lib/base.php
index 3648fff..8b5ceee 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -384,6 +384,10 @@ class OC{
 		OC_Hook::connect('OC_Filesystem', 'write', 'OC_Filesystem', 'isBlacklisted');
 		OC_Hook::connect('OC_Filesystem', 'rename', 'OC_Filesystem', 'isBlacklisted');
 
+		// register subadmin hooks
+		OC_Hook::connect('OC_User', 'post_deleteUser', 'OC_SubAdmin', 'post_deleteUser');
+		OC_Hook::connect('OC_User', 'post_deleteGroup', 'OC_SubAdmin', 'post_deleteGroup');
+		
 		//make sure temporary files are cleaned up
 		register_shutdown_function(array('OC_Helper','cleanTmp'));
 
diff --git a/lib/subadmin.php b/lib/subadmin.php
index 9e83e6d..6d137af 100644
--- a/lib/subadmin.php
+++ b/lib/subadmin.php
@@ -19,8 +19,7 @@
  * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-OC_Hook::connect('OC_User', 'post_deleteUser', 'OC_SubAdmin', 'post_deleteUser');
-OC_Hook::connect('OC_User', 'post_deleteGroup', 'OC_SubAdmin', 'post_deleteGroup');
+
 /**
  * This class provides all methods needed for managing groups.
  *
diff --git a/settings/ajax/removegroup.php b/settings/ajax/removegroup.php
index b4af6a9..33e1a51 100644
--- a/settings/ajax/removegroup.php
+++ b/settings/ajax/removegroup.php
@@ -2,7 +2,6 @@
 
 // Init owncloud
 require_once '../../lib/base.php';
-require_once '../../lib/subadmin.php';
 
 OC_JSON::checkAdminUser();
 OCP\JSON::callCheck();
diff --git a/settings/ajax/removeuser.php b/settings/ajax/removeuser.php
index 9d37c6b..1e3cd29 100644
--- a/settings/ajax/removeuser.php
+++ b/settings/ajax/removeuser.php
@@ -2,7 +2,6 @@
 
 // Init owncloud
 require_once '../../lib/base.php';
-require_once '../../lib/subadmin.php';
 
 OC_JSON::checkSubAdminUser();
 OCP\JSON::callCheck();
diff --git a/settings/ajax/togglegroups.php b/settings/ajax/togglegroups.php
index d204a67..0b4fe9a 100644
--- a/settings/ajax/togglegroups.php
+++ b/settings/ajax/togglegroups.php
@@ -2,7 +2,6 @@
 
 // Init owncloud
 require_once '../../lib/base.php';
-require_once '../../lib/subadmin.php';
 
 OC_JSON::checkSubAdminUser();
 OCP\JSON::callCheck();

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