]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Include long-form attachment URL in notice if URL shortening is disabled.
authorBrion Vibber <brion@pobox.com>
Tue, 13 Oct 2009 16:54:57 +0000 (16:54 +0000)
committerBrion Vibber <brion@pobox.com>
Tue, 13 Oct 2009 17:32:52 +0000 (10:32 -0700)
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

index d5b0332f4878bd58984b0425614a802beb0d04f6..9ee031f93636b0003f5ae6937c4bc9e892f64d48 100644 (file)
@@ -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)) {