Fixed HXR response for flag user

This commit is contained in:
Zach Copley 2009-11-19 19:29:55 -08:00
parent 2eed928837
commit 3d2a2d4173

View File

@ -72,6 +72,34 @@ class FlagprofileAction extends ProfileFormAction
return true;
}
/**
* Handle request
*
* Overriding the base Action's handle() here to deal check
* for Ajax and return an HXR response if necessary
*
* @param array $args $_REQUEST args; handled in prepare()
*
* @return void
*/
function handle($args)
{
if ($this->boolean('ajax')) {
common_debug("ajax called for");
} else {
common_debug("no ajax");
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$this->handlePost();
if (!$this->boolean('ajax')) {
$this->returnToArgs();
}
}
}
/**
* Handle POST
*
@ -97,6 +125,10 @@ class FlagprofileAction extends ProfileFormAction
}
$ufp->free();
if ($this->boolean('ajax')) {
$this->ajaxResults();
}
}
function ajaxResults() {