]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apifriendshipsshow.php
replace 'public' in documentation with 'top'
[quix0rs-gnu-social.git] / actions / apifriendshipsshow.php
index 8fc436738862662daaa9853bfcecea5e97cee40f..1eaca49f0e9a5449f692c17dc4eec43e0217d1ad 100644 (file)
@@ -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;
+    }
 }