summaryrefslogtreecommitdiff
path: root/plugins/UserFlag
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-12-28 09:08:28 -0800
committerEvan Prodromou <evan@status.net>2009-12-28 09:08:28 -0800
commit4a5bac43c33ef0006b85eb39eda10de55985d52d (patch)
treeb1f53be034781ecf620054e8a1c37ee021aeb525 /plugins/UserFlag
parentdf98ddff0c6daa6a94c71be11b7db683f6181482 (diff)
phpcs-clean flagprofile.php
Diffstat (limited to 'plugins/UserFlag')
-rw-r--r--plugins/UserFlag/flagprofile.php18
1 files changed, 12 insertions, 6 deletions
diff --git a/plugins/UserFlag/flagprofile.php b/plugins/UserFlag/flagprofile.php
index 9bce7865b..55753f4e8 100644
--- a/plugins/UserFlag/flagprofile.php
+++ b/plugins/UserFlag/flagprofile.php
@@ -63,8 +63,7 @@ class FlagprofileAction extends ProfileFormAction
assert(!empty($this->profile)); // checked above
if (User_flag_profile::exists($this->profile->id,
- $user->id))
- {
+ $user->id)) {
$this->clientError(_('Flag already exists.'));
return false;
}
@@ -72,7 +71,6 @@ class FlagprofileAction extends ProfileFormAction
return true;
}
-
/**
* Handle request
*
@@ -114,8 +112,9 @@ class FlagprofileAction extends ProfileFormAction
$ufp->created = common_sql_now();
if (!$ufp->insert()) {
- throw new ServerException(sprintf(_("Couldn't flag profile '%s' for review."),
- $this->profile->nickname));
+ $msg = sprintf(_("Couldn't flag profile '%s' for review."),
+ $this->profile->nickname);
+ throw new ServerException($msg);
}
$ufp->free();
@@ -125,7 +124,14 @@ class FlagprofileAction extends ProfileFormAction
}
}
- function ajaxResults() {
+ /**
+ * Return results as AJAX message
+ *
+ * @return void
+ */
+
+ function ajaxResults()
+ {
header('Content-Type: text/xml;charset=utf-8');
$this->xw->startDocument('1.0', 'UTF-8');
$this->elementStart('html');