]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Don't add space if there's no string in new notice content
authorMikael Nordfeldth <mmn@hethane.se>
Wed, 27 Jan 2016 21:41:53 +0000 (22:41 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Wed, 27 Jan 2016 21:41:53 +0000 (22:41 +0100)
actions/newnotice.php

index 4abcb3192fc2238789ade0bb66ab702c32078629..16ca3bb999c997fe425025c3aee380d5d77aed39 100644 (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));