summaryrefslogtreecommitdiff
path: root/actions/foaf.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2009-10-12 21:01:34 +0000
committerBrion Vibber <brion@pobox.com>2009-10-12 21:01:34 +0000
commit18df82ba2302d5b72bc42f4d3296d6fff7d16341 (patch)
treece2f955ff860b8d7355d64391d68a0f955067ec9 /actions/foaf.php
parent131292472c4bca7e99ee821ae62853f36f4c7bef (diff)
parent2b6dfbdf2b9df0992018f8df1f54b4cf16185599 (diff)
Merge branch '0.8.x' of git://gitorious.org/~brion/statusnet/brion-fixes into 0.8.x
Diffstat (limited to 'actions/foaf.php')
-rw-r--r--actions/foaf.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/actions/foaf.php b/actions/foaf.php
index 4dae9dfc1..356393304 100644
--- a/actions/foaf.php
+++ b/actions/foaf.php
@@ -146,8 +146,10 @@ class FoafAction extends Action
while ($sub->fetch()) {
if ($sub->token) {
$other = Remote_profile::staticGet('id', $sub->subscriber);
+ $profile = Profile::staticGet('id', $sub->subscriber);
} else {
$other = User::staticGet('id', $sub->subscriber);
+ $profile = Profile::staticGet('id', $sub->subscriber);
}
if (!$other) {
common_debug('Got a bad subscription: '.print_r($sub,true));
@@ -158,12 +160,15 @@ class FoafAction extends Action
} else {
$person[$other->uri] = array(LISTENER,
$other->id,
- $other->nickname,
+ $profile->nickname,
(empty($sub->token)) ? 'User' : 'Remote_profile');
}
$other->free();
$other = null;
unset($other);
+ $profile->free();
+ $profile = null;
+ unset($profile);
}
}
@@ -254,8 +259,10 @@ class FoafAction extends Action
while ($sub->fetch()) {
if (!empty($sub->token)) {
$other = Remote_profile::staticGet('id', $sub->subscribed);
+ $profile = Profile::staticGet('id', $sub->subscribed);
} else {
$other = User::staticGet('id', $sub->subscribed);
+ $profile = Profile::staticGet('id', $sub->subscribed);
}
if (empty($other)) {
common_debug('Got a bad subscription: '.print_r($sub,true));
@@ -264,11 +271,14 @@ class FoafAction extends Action
$this->element('sioc:follows', array('rdf:resource' => $other->uri.'#acct'));
$person[$other->uri] = array(LISTENEE,
$other->id,
- $other->nickname,
+ $profile->nickname,
(empty($sub->token)) ? 'User' : 'Remote_profile');
$other->free();
$other = null;
unset($other);
+ $profile->free();
+ $profile = null;
+ unset($profile);
}
}