Don't add space if there's no string in new notice content

This commit is contained in:
Mikael Nordfeldth 2016-01-27 22:41:53 +01:00
parent 03d2b680f8
commit a47563cf3d

View File

@ -104,7 +104,7 @@ class NewnoticeAction extends FormAction
// throws exception on failure
$upload = MediaFile::fromUpload('attach', $this->scoped);
if (Event::handle('StartSaveNewNoticeAppendAttachment', array($this, $upload, &$content, &$options))) {
$content .= ' ' . $upload->shortUrl();
$content = ($content==='' ? '' : ' ') . $upload->shortUrl();
}
Event::handle('EndSaveNewNoticeAppendAttachment', array($this, $upload, &$content, &$options));