]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/util.php
Refactor on File::processNew
[quix0rs-gnu-social.git] / lib / util.php
index 64733986d3db8a7fc23d20fdf1090caba0b06637..f58e8cd112a8b980aa9b75b0730054c0d6b48885 100644 (file)
@@ -987,20 +987,9 @@ function common_linkify($url) {
         $canon = "mailto:$url";
         $longurl = "mailto:$url";
     } else {
-
         $canon = File_redirection::_canonUrl($url);
-
         $longurl_data = File_redirection::where($canon, common_config('attachments', 'process_links'));
-        if (is_array($longurl_data)) {
-            $longurl = $longurl_data['url'];
-        } elseif (is_string($longurl_data)) {
-            $longurl = $longurl_data;
-        } else {
-            // Unable to reach the server to verify contents, etc
-            // Just pass the link on through for now.
-            common_log(LOG_ERR, "Can't linkify url '$url'");
-            $longurl = $url;
-        }
+        $longurl = $longurl_data->url;
     }
 
     $attrs = array('href' => $canon, 'title' => $longurl);