X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fnewnotice.php;h=0c12c7d74ad70ca022dfe57b9c0f71ff462473da;hb=78f9629bf3553a709c99e13f480bd225083e5ca5;hp=1c8f956b5d80bef41bf40916ab6347149608a451;hpb=a9c4bcd71f0ce046bd57ea727c140c6e91fcd013;p=quix0rs-gnu-social.git diff --git a/actions/newnotice.php b/actions/newnotice.php index 1c8f956b5d..0c12c7d74a 100644 --- a/actions/newnotice.php +++ b/actions/newnotice.php @@ -114,8 +114,7 @@ class NewnoticeAction extends FormAction $options['reply_to'] = $replyto; } - $upload = null; - $upload = MediaFile::fromUpload('attach'); + $upload = MediaFile::fromUpload('attach', $this->scoped); if (isset($upload)) { @@ -135,7 +134,7 @@ class NewnoticeAction extends FormAction } } - if ($user->shareLocation()) { + if ($this->scoped->shareLocation()) { // use browser data if checked; otherwise profile data if ($this->arg('notice_data-geo')) { $locOptions = Notice::locationOptions($this->trimmed('lat'), @@ -174,9 +173,7 @@ class NewnoticeAction extends FormAction Event::handle('EndSaveNewNoticeWeb', array($this, $user, &$content_shortened, &$options)); if (StatusNet::isAjax()) { - 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: Page title after sending a notice. $this->element('title', null, _('Notice posted')); @@ -184,7 +181,7 @@ class NewnoticeAction extends FormAction $this->elementStart('body'); $this->showNotice($notice); $this->elementEnd('body'); - $this->elementEnd('html'); + $this->endHTML(); exit; } else { $returnto = $this->trimmed('returnto'); @@ -219,7 +216,7 @@ class NewnoticeAction extends FormAction $this->elementStart('body'); $this->element('p', array('id' => 'error'), $msg); $this->elementEnd('body'); - $this->elementEnd('html'); + $this->endHTML(); } /** @@ -244,7 +241,7 @@ class NewnoticeAction extends FormAction $form->show(); $this->elementEnd('body'); - $this->elementEnd('html'); + $this->endHTML(); } /**