From: Evan Prodromou Date: Wed, 3 Dec 2008 04:17:30 +0000 (-0500) Subject: fix conflict with Robin's changes on trunk X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f41e5317379ca86a28f48f1a1705fb916da36d44;p=quix0rs-gnu-social.git fix conflict with Robin's changes on trunk darcs-hash:20081203041730-5ed1f-1e1910cec75546291b14386d91f3bd22ae06b750.gz --- diff --git a/lib/util.php b/lib/util.php index c44d54fbff..666a715dd6 100644 --- a/lib/util.php +++ b/lib/util.php @@ -842,8 +842,10 @@ function common_shorten_links($text) { return $cache[$text] = preg_replace('@https?://[^)\]>\s]+@e', "common_shorten_link('\\0')", $text); } -function common_shorten_link($long_url) { - +function common_shorten_link($url, $reverse = false) { + static $url_cache = array(); + if ($reverse) return isset($url_cache[$url]) ? $url_cache[$url] : $url; + $user = common_current_user(); $curlh = curl_init();