X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2FUserFlag%2Factions%2Fclearflag.php;h=4d17779322399ad158f5cc5e8c91d078787a23fe;hb=f9ddb0e20919b1b22b1a78463ffb227a009c5614;hp=e5704d6af5475a72b8f4a7154cc4b7ce72ab86bd;hpb=de55d8f83bb2ecf9461510768fe7147aec592055;p=quix0rs-gnu-social.git diff --git a/plugins/UserFlag/actions/clearflag.php b/plugins/UserFlag/actions/clearflag.php index e5704d6af5..4d17779322 100644 --- a/plugins/UserFlag/actions/clearflag.php +++ b/plugins/UserFlag/actions/clearflag.php @@ -49,7 +49,7 @@ class ClearflagAction extends ProfileFormAction * * @return boolean success flag */ - function prepare($args) + function prepare(array $args=array()) { if (!parent::prepare($args)) { return false; @@ -73,7 +73,7 @@ class ClearflagAction extends ProfileFormAction * * @return void */ - function handle($args) + function handle(array $args=array()) { if ($_SERVER['REQUEST_METHOD'] == 'POST') { $this->handlePost(); @@ -121,9 +121,7 @@ class ClearflagAction extends ProfileFormAction */ function ajaxResults() { - header('Content-Type: text/xml;charset=utf-8'); - $this->xw->startDocument('1.0', 'UTF-8'); - $this->elementStart('html'); + $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); // TRANS: Title for AJAX form to indicated that flags were removed. $this->element('title', null, _m('Flags cleared')); @@ -132,6 +130,6 @@ class ClearflagAction extends ProfileFormAction // TRANS: Body element for "flags cleared" form. $this->element('p', 'cleared', _m('Cleared')); $this->elementEnd('body'); - $this->elementEnd('html'); + $this->endHTML(); } }