X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapiuserfollowers.php;h=ebad0e5e813c059ac5496dbea801ef1ea63bfc3d;hb=a3011febdf509c7a8875e17d7cd4a8e20b724cc2;hp=a5a429259d97043c198d327a4b137e76b57bddee;hpb=8884a5255fb90fda67b63fa0d4252d77176337e5;p=quix0rs-gnu-social.git diff --git a/actions/apiuserfollowers.php b/actions/apiuserfollowers.php index a5a429259d..ebad0e5e81 100644 --- a/actions/apiuserfollowers.php +++ b/actions/apiuserfollowers.php @@ -29,11 +29,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET')) { - exit(1); -} - -require_once INSTALLDIR . '/lib/apibareauth.php'; +if (!defined('GNUSOCIAL')) { exit(1); } /** * Ouputs the authenticating user's followers (subscribers), each with @@ -55,7 +51,7 @@ class ApiUserFollowersAction extends ApiSubscriptionsAction * * @return array Profiles */ - function getProfiles() + protected function getProfiles() { $offset = ($this->page - 1) * $this->count; $limit = $this->count + 1; @@ -63,11 +59,11 @@ class ApiUserFollowersAction extends ApiSubscriptionsAction $subs = null; if (isset($this->tag)) { - $subs = $this->user->getTaggedSubscribers( + $subs = $this->target->getTaggedSubscribers( $this->tag, $offset, $limit ); } else { - $subs = $this->user->getSubscribers( + $subs = $this->target->getSubscribers( $offset, $limit ); @@ -75,10 +71,8 @@ class ApiUserFollowersAction extends ApiSubscriptionsAction $profiles = array(); - if (!empty($subs)) { - while ($subs->fetch()) { - $profiles[] = clone($subs); - } + while ($subs->fetch()) { + $profiles[] = clone($subs); } return $profiles;