]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
trac31 let * preceding a url prevent its shortening.
authormillette <millette@controlyourself.ca>
Thu, 13 Nov 2008 17:02:34 +0000 (12:02 -0500)
committermillette <millette@controlyourself.ca>
Thu, 13 Nov 2008 17:02:34 +0000 (12:02 -0500)
darcs-hash:20081113170234-099f7-b714b0640370b8ecf37aa422455831dae5ce4c5e.gz

actions/othersettings.php
lib/util.php

index 9f1ad99497b864f71f2ff92918e52d7c26821445..497500509fc50fb4a1d856d96c3d8f33c89358e3 100644 (file)
@@ -39,7 +39,6 @@ class OthersettingsAction extends SettingsAction {
                common_hidden('token', common_session_token());
 
                common_element('h2', NULL, _('URL Auto-shortening'));
-               
                $services = array(
                        '' => 'None',
             'ur1.ca' => 'ur1.ca (free service)',
@@ -52,7 +51,7 @@ class OthersettingsAction extends SettingsAction {
                        'metamark.net' => 'metamark.net'
                );
                
-               common_dropdown('urlshorteningservice', _('Service'), $services, _('Shortening service to use when notices exceed the 140 character limit.'), FALSE, $user->urlshorteningservice);
+               common_dropdown('urlshorteningservice', _('Service'), $services, _('Shortening service to use when notices exceed the 140 character limit. Precede a URL with a * to prevent shortening of that URL.'), FALSE, $user->urlshorteningservice);
                
                common_submit('save', _('Save'));
                
index 3b2ee9d87e394ee96c760c62cca7ecb4ea10b159..ee1a149a7d660df970f0ed94d1762cb9401bc18f 100644 (file)
@@ -750,8 +750,8 @@ function common_render_uri_thingy($matches) {
 function common_shorten_links($text) {
        $r = htmlspecialchars($text);
     // \s = not a horizontal whitespace character (since PHP 5.2.4)
-//     $r = preg_replace('@[^*]https?://[^)\]>\s]+@e', "common_shorten_link('\\0')", $r);
-       $r = preg_replace('@https?://[^)\]>\s]+@e', "common_shorten_link('\\0')", $r);
+       $r = preg_replace('@[^*]https?://[^)\]>\s]+@e', "common_shorten_link('\\0')", $r);
+//     $r = preg_replace('@https?://[^)\]>\s]+@e', "common_shorten_link('\\0')", $r);
        return $r;
 }