summaryrefslogtreecommitdiff
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 10:32:52 -0700
commit659a04b556f75551548c0b2fff633b15cd114135 (patch)
tree7b0ead8f066647e708f1f35608e81f95a0eb7e14
parent7021dd9341635090207a39ea8f74558e243c874f (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.
-rw-r--r--actions/newnotice.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/actions/newnotice.php b/actions/newnotice.php
index d5b0332f4..9ee031f93 100644
--- a/actions/newnotice.php
+++ b/actions/newnotice.php
@@ -240,6 +240,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 (Notice::contentTooLong($content_shortened)) {