From 659a04b556f75551548c0b2fff633b15cd114135 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 13 Oct 2009 16:54:57 +0000 Subject: 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. --- actions/newnotice.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actions/newnotice.php') 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)) { -- cgit v1.2.3-54-g00ecf