summaryrefslogtreecommitdiff
path: root/actions/foaf.php
diff options
context:
space:
mode:
authorMike Cochrane <mikec@mikenz.geek.nz>2008-07-08 05:51:13 -0400
committerMike Cochrane <mikec@mikenz.geek.nz>2008-07-08 05:51:13 -0400
commit0f502b8d8656bf9f1340611893dd0e4d736aeea3 (patch)
tree2c0dcf307cba098eb00aeb5b5582bec07b6aa5bc /actions/foaf.php
parent87b494f1ebbe7640d194ef322af12fdf378295df (diff)
Remove tralling whitespace on lines and a gettext replacement that I missed.
darcs-hash:20080708095113-533db-ad63bbde67b6275fb7ae944cc9882adf6f3be517.gz
Diffstat (limited to 'actions/foaf.php')
-rw-r--r--actions/foaf.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/actions/foaf.php b/actions/foaf.php
index d5ff00a76..bcdc077ca 100644
--- a/actions/foaf.php
+++ b/actions/foaf.php
@@ -24,14 +24,14 @@ define('LISTENEE', -1);
define('BOTH', 0);
class FoafAction extends Action {
-
+
function handle($args) {
parent::handle($args);
$nickname = $this->trimmed('nickname');
-
+
$user = User::staticGet('nickname', $nickname);
-
+
if (!$user) {
common_user_error(_('No such user'), 404);
return;
@@ -43,7 +43,7 @@ class FoafAction extends Action {
common_server_error(_('User has no profile'), 500);
return;
}
-
+
header('Content-Type: application/rdf+xml');
common_start_xml();
@@ -56,9 +56,9 @@ class FoafAction extends Action {
'xmlns' => 'http://xmlns.com/foaf/0.1/'));
# This is the document about the user
-
+
$this->show_ppd('', $user->uri);
-
+
# XXX: might not be a person
common_element_start('Person', array('rdf:about' =>
$user->uri));
@@ -101,7 +101,7 @@ class FoafAction extends Action {
}
# Get people user is subscribed to
-
+
$person = array();
$sub = new Subscription();
@@ -146,7 +146,7 @@ class FoafAction extends Action {
}
}
}
-
+
common_element_end('Person');
foreach ($person as $uri => $p) {
@@ -169,17 +169,17 @@ class FoafAction extends Action {
$this->show_ppd($foaf_url, $uri);
}
}
-
+
common_element_end('rdf:RDF');
}
-
+
function show_ppd($foaf_url, $person_uri) {
common_element_start('PersonalProfileDocument', array('rdf:about' => $foaf_url));
common_element('maker', array('rdf:resource' => $person_uri));
common_element('primaryTopic', array('rdf:resource' => $person_uri));
common_element_end('PersonalProfileDocument');
}
-
+
function show_microblogging_account($profile, $service=NULL) {
# Their account
common_element_start('holdsAccount');