]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Favorite/actions/atompubshowfavorite.php
Merge branch 'master' of gitorious.org:social/mainline into social-master
[quix0rs-gnu-social.git] / plugins / Favorite / actions / atompubshowfavorite.php
index 436e88e6939e548f3e7b9ce0dd1a00bfc4b48279..bbdddc07d934e8aed4814d2d2c06ae76e731689b 100644 (file)
@@ -55,13 +55,13 @@ class AtompubshowfavoriteAction extends ApiAuthAction
     /**
      * For initializing members of the class.
      *
-     * @param array $argarray misc. arguments
+     * @param array $args misc. arguments
      *
      * @return boolean true
      */
-    function prepare($argarray)
+    protected function prepare(array $args=array())
     {
-        parent::prepare($argarray);
+        parent::prepare($args);
 
         $profileId = $this->trimmed('profile');
         $noticeId  = $this->trimmed('notice');
@@ -94,26 +94,23 @@ class AtompubshowfavoriteAction extends ApiAuthAction
     /**
      * Handler method
      *
-     * @param array $argarray is ignored since it's now passed in in prepare()
-     *
      * @return void
      */
-    function handle($argarray=null)
+    protected function handle()
     {
-        parent::handle($argarray);
+        parent::handle();
 
         switch ($_SERVER['REQUEST_METHOD']) {
-        case GET:
-        case HEAD:
+        case 'GET':
+        case 'HEAD':
             $this->showFave();
             break;
-        case DELETE:
+        case 'DELETE':
             $this->deleteFave();
             break;
         default:
             // TRANS: Client exception thrown using an unsupported HTTP method.
-            throw new ClientException(_('HTTP method not supported.'),
-                                      405);
+            throw new ClientException(_('HTTP method not supported.'), 405);
         }
         return true;
     }
@@ -164,7 +161,7 @@ class AtompubshowfavoriteAction extends ApiAuthAction
      *
      * @return boolean is read only action?
      */
-    function isReadOnly($args)
+    function isReadOnly(array $args=array())
     {
         if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
             $_SERVER['REQUEST_METHOD'] == 'HEAD') {