X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapiuserfollowers.php;fp=actions%2Fapiuserfollowers.php;h=ebad0e5e813c059ac5496dbea801ef1ea63bfc3d;hb=29d0871e5a5b2561387bcad40ef4644ee1c2be08;hp=61d743e27c1356919183f960fe730fb55b57ebb0;hpb=8202e922aa3e8bdc9e622fac35b77f51fd69ffa5;p=quix0rs-gnu-social.git diff --git a/actions/apiuserfollowers.php b/actions/apiuserfollowers.php index 61d743e27c..ebad0e5e81 100644 --- a/actions/apiuserfollowers.php +++ b/actions/apiuserfollowers.php @@ -29,9 +29,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET')) { - exit(1); -} +if (!defined('GNUSOCIAL')) { exit(1); } /** * Ouputs the authenticating user's followers (subscribers), each with @@ -53,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; @@ -61,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 ); @@ -73,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;