summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2009-10-13 16:54:57 +0000
committerBrion Vibber <brion@pobox.com>2009-10-13 16:54:57 +0000
commit2c5aeb11b1c75ea36aaf638735b4d5b261d2770c (patch)
tree113c2cce488c94752af4ab44164984be77d5ad29 /actions
parent834ac7aa1172518c112bbf90561ead34499e20b8 (diff)
Include long-form attachment URL in notice if URL shortening is disabled.
Previously, the attachment URL would simply be dropped when shortening returned false instead of a short URL... the attachment was present if you clicked through to notice details but didn't appear in the timeline, making it nigh-impossible to see the attachment.
Diffstat (limited to 'actions')
-rw-r--r--actions/newnotice.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/actions/newnotice.php b/actions/newnotice.php
index 6e3720e09..8c0476f70 100644
--- a/actions/newnotice.php
+++ b/actions/newnotice.php
@@ -239,6 +239,10 @@ class NewnoticeAction extends Action
$this->maybeAddRedir($fileRecord->id, $fileurl);
$short_fileurl = common_shorten_url($fileurl);
+ if (!$short_fileurl) {
+ // todo -- Consider forcing default shortener if none selected?
+ $short_fileurl = $fileurl;
+ }
$content_shortened .= ' ' . $short_fileurl;
if (mb_strlen($content_shortened) > 140) {