diff options
author | Carlos Perilla <deepspawn@valkertown.org> | 2009-09-01 09:19:10 -0500 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2009-09-01 17:52:03 -0400 |
commit | aa7bda4677f1fe7a6168665d4d5e29e8fa2db68c (patch) | |
tree | d465faf41a96b79c37a6362c2d308a6f18f678bd /actions/foaf.php | |
parent | e0e30552cf069e71453f3c3bcf8dce960cf6b553 (diff) |
Fixes foaf notices, use Profile for information that's missing in Remote_profile
Diffstat (limited to 'actions/foaf.php')
-rw-r--r-- | actions/foaf.php | 14 |
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); } } |