aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorMikael Nordfeldth <mmn@hethane.se>2016-01-27 22:41:53 +0100
committerMikael Nordfeldth <mmn@hethane.se>2016-01-27 22:41:53 +0100
commita47563cf3d2a45cd3f80ea8cefad6ceae9cf4a62 (patch)
tree0df49a76e56f0a1a14a8f1688f18d1cb9e79fa21 /actions
parent03d2b680f85fbe645ea981583102f0219dc6610e (diff)
downloadgnu-social-a47563cf3d2a45cd3f80ea8cefad6ceae9cf4a62.tar
gnu-social-a47563cf3d2a45cd3f80ea8cefad6ceae9cf4a62.zip
Don't add space if there's no string in new notice content
Diffstat (limited to 'actions')
-rw-r--r--actions/newnotice.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/actions/newnotice.php b/actions/newnotice.php
index 4abcb3192f..16ca3bb999 100644
--- a/actions/newnotice.php
+++ b/actions/newnotice.php
@@ -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));