]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
fix conflict with Robin's changes on trunk
authorEvan Prodromou <evan@controlyourself.ca>
Wed, 3 Dec 2008 04:17:30 +0000 (23:17 -0500)
committerEvan Prodromou <evan@controlyourself.ca>
Wed, 3 Dec 2008 04:17:30 +0000 (23:17 -0500)
darcs-hash:20081203041730-5ed1f-1e1910cec75546291b14386d91f3bd22ae06b750.gz

lib/util.php

index c44d54fbff649c99a365358cc5b946cd3aedf434..666a715dd6d828a8819a770f2c58322a75feab6a 100644 (file)
@@ -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();