diff options
author | Jakob Sack <kde@jakobsack.de> | 2011-07-29 21:36:03 +0200 |
---|---|---|
committer | Jakob Sack <kde@jakobsack.de> | 2011-07-29 21:36:03 +0200 |
commit | bafd684eb694ed0bd86b46ff7cd36382c1cebc34 (patch) | |
tree | c3bb1e013d563263002d052eb41032076a36a5f9 /lib/group.php | |
parent | 220132ca237f5077f5145bf327e8528a652ad559 (diff) | |
download | nextcloud-server-bafd684eb694ed0bd86b46ff7cd36382c1cebc34.tar.gz nextcloud-server-bafd684eb694ed0bd86b46ff7cd36382c1cebc34.zip |
Renaming classes :-)
Diffstat (limited to 'lib/group.php')
-rw-r--r-- | lib/group.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/group.php b/lib/group.php index 71caaee6132..1161b9035fa 100644 --- a/lib/group.php +++ b/lib/group.php @@ -33,7 +33,7 @@ * pre_removeFromGroup(&run, uid, gid) * post_removeFromGroup(uid, gid) */ -class OC_GROUP { +class OC_Group { // The backend used for user management private static $_backend; @@ -78,7 +78,7 @@ class OC_GROUP { case 'database': case 'mysql': case 'sqlite': - self::$_backend = new OC_GROUP_DATABASE(); + self::$_backend = new OC_Group_Database(); break; default: $className = 'OC_GROUP_' . strToUpper($backend); @@ -113,10 +113,10 @@ class OC_GROUP { } $run = true; - OC_HOOK::emit( "OC_GROUP", "pre_createGroup", array( "run" => &$run, "gid" => $gid )); + OC_Hook::emit( "OC_Group", "pre_createGroup", array( "run" => &$run, "gid" => $gid )); if( $run && self::$_backend->createGroup( $gid )){ - OC_HOOK::emit( "OC_GROUP", "post_createGroup", array( "gid" => $gid )); + OC_Hook::emit( "OC_Group", "post_createGroup", array( "gid" => $gid )); return true; } else{ @@ -138,10 +138,10 @@ class OC_GROUP { } $run = true; - OC_HOOK::emit( "OC_GROUP", "pre_deleteGroup", array( "run" => &$run, "gid" => $gid )); + OC_Hook::emit( "OC_Group", "pre_deleteGroup", array( "run" => &$run, "gid" => $gid )); if( $run && self::$_backend->deleteGroup( $gid )){ - OC_HOOK::emit( "OC_GROUP", "post_deleteGroup", array( "gid" => $gid )); + OC_Hook::emit( "OC_Group", "post_deleteGroup", array( "gid" => $gid )); return true; } else{ @@ -171,7 +171,7 @@ class OC_GROUP { */ public static function addToGroup( $uid, $gid ){ // Does the user exist? - if( !in_array( $uid, OC_USER::getUsers())){ + if( !in_array( $uid, OC_User::getUsers())){ return false; } // Does the group exist? @@ -181,10 +181,10 @@ class OC_GROUP { // Go go go $run = true; - OC_HOOK::emit( "OC_GROUP", "pre_addToGroup", array( "run" => &$run, "uid" => $uid, "gid" => $gid )); + OC_Hook::emit( "OC_Group", "pre_addToGroup", array( "run" => &$run, "uid" => $uid, "gid" => $gid )); if( $run && self::$_backend->addToGroup( $uid, $gid )){ - OC_HOOK::emit( "OC_GROUP", "post_addToGroup", array( "uid" => $uid, "gid" => $gid )); + OC_Hook::emit( "OC_Group", "post_addToGroup", array( "uid" => $uid, "gid" => $gid )); return true; } else{ @@ -202,10 +202,10 @@ class OC_GROUP { */ public static function removeFromGroup( $uid, $gid ){ $run = true; - OC_HOOK::emit( "OC_GROUP", "pre_removeFromGroup", array( "run" => &$run, "uid" => $uid, "gid" => $gid )); + OC_Hook::emit( "OC_Group", "pre_removeFromGroup", array( "run" => &$run, "uid" => $uid, "gid" => $gid )); if( $run && self::$_backend->removeFromGroup( $uid, $gid )){ - OC_HOOK::emit( "OC_GROUP", "post_removeFromGroup", array( "uid" => $uid, "gid" => $gid )); + OC_Hook::emit( "OC_Group", "post_removeFromGroup", array( "uid" => $uid, "gid" => $gid )); return true; } else{ |