]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
phpcs-clean clearflag.php
authorEvan Prodromou <evan@status.net>
Mon, 28 Dec 2009 17:06:38 +0000 (09:06 -0800)
committerEvan Prodromou <evan@status.net>
Mon, 28 Dec 2009 17:06:38 +0000 (09:06 -0800)
plugins/UserFlag/clearflag.php

index 58151d33ce34d778588ea92aade3a4aa276e1273..bd6732e2dac0b4824544576e08a580e8e08c3588 100644 (file)
@@ -89,6 +89,8 @@ class ClearflagAction extends ProfileFormAction
     /**
      * Handle POST
      *
+     * Executes the actions; deletes all flags
+     *
      * @return void
      */
 
@@ -102,8 +104,9 @@ class ClearflagAction extends ProfileFormAction
                               'AND profile_id = ' . $this->profile->id);
 
         if ($result == false) {
-            throw new ServerException(sprintf(_("Couldn't clear flags for profile '%s'."),
-                                              $this->profile->nickname));
+            $msg = sprintf(_("Couldn't clear flags for profile '%s'."),
+                           $this->profile->nickname);
+            throw new ServerException($msg);
         }
 
         $ufp->free();
@@ -113,7 +116,14 @@ class ClearflagAction extends ProfileFormAction
         }
     }
 
-    function ajaxResults() {
+    /**
+     * Return results in ajax form
+     *
+     * @return void
+     */
+
+    function ajaxResults()
+    {
         header('Content-Type: text/xml;charset=utf-8');
         $this->xw->startDocument('1.0', 'UTF-8');
         $this->elementStart('html');
@@ -126,4 +136,3 @@ class ClearflagAction extends ProfileFormAction
         $this->elementEnd('html');
     }
 }
-