aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/group.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-02-22 17:40:42 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-02-22 17:40:42 +0000
commit00ed0f85bc5f29294840481da83ba870c81d9688 (patch)
tree5685825381ac385329f84e9ea31440f67c625f68 /engine/lib/group.php
parent6afa8f116066816be7d280d21b03672a3005b567 (diff)
downloadelgg-00ed0f85bc5f29294840481da83ba870c81d9688.tar.gz
elgg-00ed0f85bc5f29294840481da83ba870c81d9688.tar.bz2
Fixes #1528: Correctly throwing exceptions for objects, groups, and users.
git-svn-id: http://code.elgg.org/elgg/trunk@3968 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/group.php')
-rw-r--r--engine/lib/group.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/engine/lib/group.php b/engine/lib/group.php
index a87dbf071..58fd4adab 100644
--- a/engine/lib/group.php
+++ b/engine/lib/group.php
@@ -49,7 +49,7 @@ class ElggGroup extends ElggEntity
// Is $guid is an ElggGroup? Use a copy constructor
else if ($guid instanceof ElggGroup) {
elgg_deprecated_notice('This type of usage of the ElggGroup constructor was deprecated. Please use the clone method.', 1.7);
-
+
foreach ($guid->attributes as $key => $value) {
$this->attributes[$key] = $value;
}
@@ -61,7 +61,7 @@ class ElggGroup extends ElggEntity
// We assume if we have got this far, $guid is an int
else if (is_numeric($guid)) {
if (!$this->load($guid)) {
- IOException(sprintf(elgg_echo('IOException:FailedToLoadGUID'), get_class(), $guid));
+ throw new IOException(sprintf(elgg_echo('IOException:FailedToLoadGUID'), get_class(), $guid));
}
}
@@ -747,13 +747,13 @@ function get_entities_from_metadata_groups_multi($group_guid, $meta_array, $enti
*/
function get_group_members($group_guid, $limit = 10, $offset = 0, $site_guid = 0, $count = false) {
return elgg_get_entities_from_relationship(array(
- 'relationship' => 'member',
- 'relationship_guid' => $group_guid,
- 'inverse_relationship' => TRUE,
- 'types' => 'user',
- 'limit' => $limit,
- 'offset' => $offset,
- 'count' => $count,
+ 'relationship' => 'member',
+ 'relationship_guid' => $group_guid,
+ 'inverse_relationship' => TRUE,
+ 'types' => 'user',
+ 'limit' => $limit,
+ 'offset' => $offset,
+ 'count' => $count,
'site_guid' => $site_guid
));
}