projects
/
quix0rs-gnu-social.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03d2b68
)
Don't add space if there's no string in new notice content
author
Mikael Nordfeldth
<mmn@hethane.se>
Wed, 27 Jan 2016 21:41:53 +0000
(22:41 +0100)
committer
Mikael Nordfeldth
<mmn@hethane.se>
Wed, 27 Jan 2016 21:41:53 +0000
(22:41 +0100)
actions/newnotice.php
patch
|
blob
|
history
diff --git
a/actions/newnotice.php
b/actions/newnotice.php
index 4abcb3192fc2238789ade0bb66ab702c32078629..16ca3bb999c997fe425025c3aee380d5d77aed39 100644
(file)
--- 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));