]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apifavoritedestroy.php
Merge branch 'locshunt' into 0.9.x
[quix0rs-gnu-social.git] / actions / apifavoritedestroy.php
index a70d5c79b140f2c1f6fe80e421e55bec69ffa980..f131d1c7f2c4a9c25b6f58f7f4a5288fa2d0077f 100644 (file)
@@ -21,6 +21,8 @@
  *
  * @category  API
  * @package   StatusNet
+ * @author    Craig Andrews <candrews@integralblue.com>
+ * @author    Evan Prodromou <evan@status.net>
  * @author    Zach Copley <zach@status.net>
  * @copyright 2009 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
@@ -31,7 +33,7 @@ if (!defined('STATUSNET')) {
     exit(1);
 }
 
-require_once INSTALLDIR.'/lib/apiauth.php';
+require_once INSTALLDIR . '/lib/apiauth.php';
 
 /**
  * Un-favorites the status specified in the ID parameter as the authenticating user.
@@ -39,6 +41,8 @@ require_once INSTALLDIR.'/lib/apiauth.php';
  *
  * @category API
  * @package  StatusNet
+ * @author   Craig Andrews <candrews@integralblue.com>
+ * @author   Evan Prodromou <evan@status.net>
  * @author   Zach Copley <zach@status.net>
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
@@ -47,9 +51,8 @@ require_once INSTALLDIR.'/lib/apiauth.php';
 class ApiFavoriteDestroyAction extends ApiAuthAction
 {
 
-    var $format = null;
-    var $user   = null;
     var $notice = null;
+
     /**
      * Take arguments for running
      *
@@ -63,13 +66,6 @@ class ApiFavoriteDestroyAction extends ApiAuthAction
     {
         parent::prepare($args);
 
-        if ($this->requiresAuth()) {
-            if ($this->checkBasicAuthUser() == false) {
-                return;
-            }
-        }
-
-        $this->format = $this->arg('format');
         $this->user   = $this->auth_user;
         $this->notice = Notice::staticGet($this->arg('id'));
 
@@ -145,7 +141,7 @@ class ApiFavoriteDestroyAction extends ApiAuthAction
         $this->user->blowFavesCache();
 
         if ($this->format == 'xml') {
-            $this->show_single_xml_status($this->notice);
+            $this->showSingleXmlStatus($this->notice);
         } elseif ($this->format == 'json') {
             $this->show_single_json_status($this->notice);
         }