summaryrefslogtreecommitdiff
path: root/actions/foafgroup.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/foafgroup.php')
-rw-r--r--actions/foafgroup.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/actions/foafgroup.php b/actions/foafgroup.php
index f5fd7fe88..ebdf1cee2 100644
--- a/actions/foafgroup.php
+++ b/actions/foafgroup.php
@@ -56,7 +56,14 @@ class FoafGroupAction extends Action
return false;
}
- $this->group = User_group::staticGet('nickname', $this->nickname);
+ $local = Local_group::staticGet('nickname', $nickname);
+
+ if (!$local) {
+ $this->clientError(_('No such group.'), 404);
+ return false;
+ }
+
+ $this->group = User_group::staticGet('id', $local->group_id);
if (!$this->group) {
$this->clientError(_('No such group.'), 404);
@@ -113,7 +120,7 @@ class FoafGroupAction extends Action
if ($this->group->homepage_logo) {
$this->element('depiction', array('rdf:resource' => $this->group->homepage_logo));
}
-
+
$members = $this->group->getMembers();
$member_details = array();
while ($members->fetch()) {
@@ -123,7 +130,7 @@ class FoafGroupAction extends Action
);
$this->element('member', array('rdf:resource' => $member_uri));
}
-
+
$admins = $this->group->getAdmins();
while ($admins->fetch()) {
$admin_uri = common_local_url('userbyid', array('id'=>$admins->id));
@@ -132,7 +139,7 @@ class FoafGroupAction extends Action
}
$this->elementEnd('Group');
-
+
ksort($member_details);
foreach ($member_details as $uri => $details) {
if ($details['is_admin'])
@@ -158,7 +165,7 @@ class FoafGroupAction extends Action
));
}
}
-
+
$this->elementEnd('rdf:RDF');
$this->endXML();
}