From: millette <millette@controlyourself.ca>
Date: Thu, 13 Nov 2008 17:02:34 +0000 (-0500)
Subject: trac31 let * preceding a url prevent its shortening.
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f2506b0339d073294ce5e1a17c3ce9a661a983e9;p=quix0rs-gnu-social.git

trac31 let * preceding a url prevent its shortening.

darcs-hash:20081113170234-099f7-b714b0640370b8ecf37aa422455831dae5ce4c5e.gz
---

diff --git a/actions/othersettings.php b/actions/othersettings.php
index 9f1ad99497..497500509f 100644
--- a/actions/othersettings.php
+++ b/actions/othersettings.php
@@ -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'));
 		
diff --git a/lib/util.php b/lib/util.php
index 3b2ee9d87e..ee1a149a7d 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -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;
 }