Commit a47563cf authored by mmn's avatar mmn

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

parent 03d2b680
......@@ -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));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment