From bafd684eb694ed0bd86b46ff7cd36382c1cebc34 Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Fri, 29 Jul 2011 21:36:03 +0200 Subject: Renaming classes :-) --- lib/group.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'lib/group.php') 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{ -- cgit v1.2.3