phpcs-clean flagprofile.php
This commit is contained in:
parent
df98ddff0c
commit
4a5bac43c3
@ -63,8 +63,7 @@ class FlagprofileAction extends ProfileFormAction
|
|||||||
assert(!empty($this->profile)); // checked above
|
assert(!empty($this->profile)); // checked above
|
||||||
|
|
||||||
if (User_flag_profile::exists($this->profile->id,
|
if (User_flag_profile::exists($this->profile->id,
|
||||||
$user->id))
|
$user->id)) {
|
||||||
{
|
|
||||||
$this->clientError(_('Flag already exists.'));
|
$this->clientError(_('Flag already exists.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -72,7 +71,6 @@ class FlagprofileAction extends ProfileFormAction
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle request
|
* Handle request
|
||||||
*
|
*
|
||||||
@ -114,8 +112,9 @@ class FlagprofileAction extends ProfileFormAction
|
|||||||
$ufp->created = common_sql_now();
|
$ufp->created = common_sql_now();
|
||||||
|
|
||||||
if (!$ufp->insert()) {
|
if (!$ufp->insert()) {
|
||||||
throw new ServerException(sprintf(_("Couldn't flag profile '%s' for review."),
|
$msg = sprintf(_("Couldn't flag profile '%s' for review."),
|
||||||
$this->profile->nickname));
|
$this->profile->nickname);
|
||||||
|
throw new ServerException($msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
$ufp->free();
|
$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');
|
header('Content-Type: text/xml;charset=utf-8');
|
||||||
$this->xw->startDocument('1.0', 'UTF-8');
|
$this->xw->startDocument('1.0', 'UTF-8');
|
||||||
$this->elementStart('html');
|
$this->elementStart('html');
|
||||||
|
Loading…
Reference in New Issue
Block a user