From f41e5317379ca86a28f48f1a1705fb916da36d44 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 2 Dec 2008 23:17:30 -0500 Subject: fix conflict with Robin's changes on trunk darcs-hash:20081203041730-5ed1f-1e1910cec75546291b14386d91f3bd22ae06b750.gz --- lib/util.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/util.php b/lib/util.php index c44d54fbf..666a715dd 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(); -- cgit v1.2.3-54-g00ecf