Only serve tagprofile HTML if we aren't POSTing via ajax
This fixes an issue where POSTing the selftag form in the profile_block sidebar via AJAX would generate an XML response containing both the content from doPost() and showPage(), resulting in invalid XML. These changes make it so that if we're POSTing via AJAX, we serve content from doPost(), otherwise we serve showPage() but never both.
This commit is contained in:
parent
3294d704a4
commit
47c83f4c49
@ -65,6 +65,15 @@ class TagprofileAction extends FormAction
|
|||||||
return sprintf(_m('ADDTOLIST','List %s'), $this->target->getNickname());
|
return sprintf(_m('ADDTOLIST','List %s'), $this->target->getNickname());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showPage()
|
||||||
|
{
|
||||||
|
// Only serve page content if we aren't POSTing via ajax
|
||||||
|
// otherwise, we serve XML content from doPost()
|
||||||
|
if (!$this->isPost() || !$this->boolean('ajax')) {
|
||||||
|
parent::showPage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
$this->elementStart('div', 'entity_profile h-card');
|
$this->elementStart('div', 'entity_profile h-card');
|
||||||
|
Loading…
Reference in New Issue
Block a user