X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapifriendshipsexists.php;h=ca62b5f51420b81009d766bdebb30e6fd17d359d;hb=c95daacfdb6d89098716b8eeccfdd82124019d7a;hp=ae50c512c81b62fe8006b723affe25a6b96ffbcb;hpb=384a50a7800abde62e040ea57872dc06c0519047;p=quix0rs-gnu-social.git diff --git a/actions/apifriendshipsexists.php b/actions/apifriendshipsexists.php index ae50c512c8..ca62b5f514 100644 --- a/actions/apifriendshipsexists.php +++ b/actions/apifriendshipsexists.php @@ -33,7 +33,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/api.php'; +require_once INSTALLDIR . '/lib/apiprivateauth.php'; /** * Tests for the existence of friendship between two users. Will return true if @@ -48,7 +48,7 @@ require_once INSTALLDIR . '/lib/api.php'; * @link http://status.net/ */ -class ApiFriendshipsExistsAction extends ApiAction +class ApiFriendshipsExistsAction extends ApiPrivateAuthAction { var $user_a = null; var $user_b = null; @@ -69,16 +69,7 @@ class ApiFriendshipsExistsAction extends ApiAction $user_a_id = $this->trimmed('user_a'); $user_b_id = $this->trimmed('user_b'); - common_debug("user_a = " . $user_a_id); - common_debug("user_b = " . $user_b_id); - - $this->user_a = $this->getTargetUser($user_a_id); - - if (empty($this->user_a)) { - common_debug('gargargra'); - } - $this->user_b = $this->getTargetUser($user_b_id); return true; @@ -125,4 +116,19 @@ class ApiFriendshipsExistsAction extends ApiAction } } + /** + * Return true if read only. + * + * MAY override + * + * @param array $args other arguments + * + * @return boolean is read only action? + */ + + function isReadOnly($args) + { + return true; + } + }