X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapifriendshipsshow.php;h=c08e984b9ad3d2bb288efc36494e9b59566bafb5;hb=4238875ebe784dfcac2d639ef48cae005923f86d;hp=58e610ecdb529f8dec5d5ba10e6d2321cf2f4831;hpb=a9c4bcd71f0ce046bd57ea727c140c6e91fcd013;p=quix0rs-gnu-social.git diff --git a/actions/apifriendshipsshow.php b/actions/apifriendshipsshow.php index 58e610ecdb..c08e984b9a 100644 --- a/actions/apifriendshipsshow.php +++ b/actions/apifriendshipsshow.php @@ -29,9 +29,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET')) { - exit(1); -} +if (!defined('GNUSOCIAL')) { exit(1); } /** * Outputs detailed information about the relationship between two users @@ -56,7 +54,7 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction * * @return boolean success flag */ - function prepare($args) + protected function prepare(array $args=array()) { parent::prepare($args); @@ -109,18 +107,15 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction * * Check the format and show the user info * - * @param array $args $_REQUEST data (unused) - * * @return void */ - function handle($args) + protected function handle() { - parent::handle($args); + parent::handle(); if (!in_array($this->format, array('xml', 'json'))) { // TRANS: Client error displayed when coming across a non-supported API method. $this->clientError(_('API method not found.'), 404); - return; } if (empty($this->source)) { @@ -129,7 +124,6 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction _('Could not determine source user.'), 404 ); - return; } if (empty($this->target)) { @@ -138,7 +132,6 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction _('Could not find target user.'), 404 ); - return; } $result = $this->twitterRelationshipArray($this->source, $this->target);