X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapifriendshipsshow.php;h=1eaca49f0e9a5449f692c17dc4eec43e0217d1ad;hb=25198a8d4cee5b2182f1ecb99192a4108a01afa4;hp=8fc436738862662daaa9853bfcecea5e97cee40f;hpb=861e0f02270c43e5303471ae9c419662cac76142;p=quix0rs-gnu-social.git diff --git a/actions/apifriendshipsshow.php b/actions/apifriendshipsshow.php index 8fc4367388..1eaca49f0e 100644 --- a/actions/apifriendshipsshow.php +++ b/actions/apifriendshipsshow.php @@ -46,7 +46,6 @@ require_once INSTALLDIR . '/lib/apibareauth.php'; * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class ApiFriendshipsShowAction extends ApiBareAuthAction { var $source = null; @@ -58,9 +57,7 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction * @param array $args $_REQUEST args * * @return boolean success flag - * */ - function prepare($args) { parent::prepare($args); @@ -87,14 +84,12 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction return true; } - /** * Determines whether this API resource requires auth. Overloaded to look * return true in case source_id and source_screen_name are both empty * * @return boolean true or false */ - function requiresAuth() { if (common_config('site', 'private')) { @@ -120,18 +115,19 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction * * @return void */ - function handle($args) { parent::handle($args); if (!in_array($this->format, array('xml', 'json'))) { - $this->clientError(_('API method not found!'), 404); + // TRANS: Client error displayed when coming across a non-supported API method. + $this->clientError(_('API method not found.'), 404); return; } if (empty($this->source)) { $this->clientError( + // TRANS: Client error displayed when a source user could not be determined showing friendship. _('Could not determine source user.'), 404 ); @@ -140,6 +136,7 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction if (empty($this->target)) { $this->clientError( + // TRANS: Client error displayed when a target user could not be determined showing friendship. _('Could not find target user.'), 404 ); @@ -162,7 +159,20 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction default: break; } - } + /** + * Return true if read only. + * + * MAY override + * + * @param array $args other arguments + * + * @return boolean is read only action? + */ + + function isReadOnly($args) + { + return true; + } }