summaryrefslogtreecommitdiff
path: root/plugins/UserFlag/clearflag.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-12-28 09:06:38 -0800
committerEvan Prodromou <evan@status.net>2009-12-28 09:06:38 -0800
commitdf98ddff0c6daa6a94c71be11b7db683f6181482 (patch)
treec51d790b75fceefe08631b3a80310ef7cdb2d4fc /plugins/UserFlag/clearflag.php
parentc8fd5403e5bfc3b9110042eb1573904625f607e1 (diff)
phpcs-clean clearflag.php
Diffstat (limited to 'plugins/UserFlag/clearflag.php')
-rw-r--r--plugins/UserFlag/clearflag.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/plugins/UserFlag/clearflag.php b/plugins/UserFlag/clearflag.php
index 58151d33c..bd6732e2d 100644
--- a/plugins/UserFlag/clearflag.php
+++ b/plugins/UserFlag/clearflag.php
@@ -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');
}
}
-