diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-07-10 02:17:24 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-07-10 02:17:24 +0200 |
commit | 065bc96b02c6da881a08335f0b6b818350e9fcb8 (patch) | |
tree | 4c276f25e8c51bf6e3111d2516d95342e83e653c | |
parent | db1477553680a8471f16f449f67d930d02b8cff5 (diff) | |
download | nextcloud-server-065bc96b02c6da881a08335f0b6b818350e9fcb8.tar.gz nextcloud-server-065bc96b02c6da881a08335f0b6b818350e9fcb8.zip |
more consistent naming
-rw-r--r-- | lib/group.php | 4 | ||||
-rw-r--r-- | lib/group/manager.php | 8 | ||||
-rw-r--r-- | tests/lib/group/manager.php | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/lib/group.php b/lib/group.php index 4b57073a123..8fbf5f86418 100644 --- a/lib/group.php +++ b/lib/group.php @@ -84,7 +84,7 @@ class OC_Group { public static function createGroup($gid) { OC_Hook::emit("OC_Group", "pre_createGroup", array("run" => true, "gid" => $gid)); - if (self::getManager()->create($gid)) { + if (self::getManager()->createGroup($gid)) { OC_Hook::emit("OC_User", "post_createGroup", array("gid" => $gid)); return true; } else { @@ -220,7 +220,7 @@ class OC_Group { * @return bool */ public static function groupExists($gid) { - return self::getManager()->exists($gid); + return self::getManager()->groupExists($gid); } /** diff --git a/lib/group/manager.php b/lib/group/manager.php index 0599015780f..7efcff0ade0 100644 --- a/lib/group/manager.php +++ b/lib/group/manager.php @@ -93,7 +93,7 @@ class Manager extends PublicEmitter { * @param string $gid * @return bool */ - public function exists($gid) { + public function groupExists($gid) { return !is_null($this->get($gid)); } @@ -101,10 +101,10 @@ class Manager extends PublicEmitter { * @param string $gid * @return \OC\Group\Group */ - public function create($gid) { + public function createGroup($gid) { if (!$gid) { return false; - } else if ($this->exists($gid)) { + } else if ($this->groupExists($gid)) { return $this->get($gid); } else { $this->emit('\OC\Group', 'preCreate', array($gid)); @@ -126,7 +126,7 @@ class Manager extends PublicEmitter { * @param int $offset * @return \OC\Group\Group[] */ - public function search($search = '', $limit = null, $offset = null) { + public function search($search, $limit = null, $offset = null) { $groups = array(); foreach ($this->backends as $backend) { $groupIds = $backend->getGroups($search, $limit, $offset); diff --git a/tests/lib/group/manager.php b/tests/lib/group/manager.php index 8a1db4592a4..2ecaefc1406 100644 --- a/tests/lib/group/manager.php +++ b/tests/lib/group/manager.php @@ -134,7 +134,7 @@ class Manager extends \PHPUnit_Framework_TestCase { $manager = new \OC\Group\Manager($userManager); $manager->addBackend($backend); - $group = $manager->create('group1'); + $group = $manager->createGroup('group1'); $this->assertEquals('group1', $group->getGID()); } @@ -157,7 +157,7 @@ class Manager extends \PHPUnit_Framework_TestCase { $manager = new \OC\Group\Manager($userManager); $manager->addBackend($backend); - $group = $manager->create('group1'); + $group = $manager->createGroup('group1'); $this->assertEquals('group1', $group->getGID()); } |