X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Ffoaf.php;h=6811fc05af647808fd384934c79e20d0bfc44f57;hb=2abe10b8ea4b5d69fc7f6513bf465541454ca2cf;hp=bcdc077ca5fac33c4f80f9c430f5b1b0d770d557;hpb=0f502b8d8656bf9f1340611893dd0e4d736aeea3;p=quix0rs-gnu-social.git diff --git a/actions/foaf.php b/actions/foaf.php index bcdc077ca5..6811fc05af 100644 --- a/actions/foaf.php +++ b/actions/foaf.php @@ -25,6 +25,10 @@ define('BOTH', 0); class FoafAction extends Action { + function is_readonly() { + return true; + } + function handle($args) { parent::handle($args); @@ -33,14 +37,14 @@ class FoafAction extends Action { $user = User::staticGet('nickname', $nickname); if (!$user) { - common_user_error(_('No such user'), 404); + common_user_error(_('No such user.'), 404); return; } $profile = $user->getProfile(); if (!$profile) { - common_server_error(_('User has no profile'), 500); + common_server_error(_('User has no profile.'), 500); return; } @@ -106,7 +110,8 @@ class FoafAction extends Action { $sub = new Subscription(); $sub->subscriber = $profile->id; - + $sub->whereAdd('subscriber != subscribed'); + if ($sub->find()) { while ($sub->fetch()) { if ($sub->token) { @@ -127,6 +132,7 @@ class FoafAction extends Action { $sub = new Subscription(); $sub->subscribed = $profile->id; + $sub->whereAdd('subscriber != subscribed'); if ($sub->find()) { while ($sub->fetch()) {