]> git.wh0rd.org - tt-rss.git/blobdiff - functions.php
update translations
[tt-rss.git] / functions.php
index 60a4a4bfdfb965d24835ad618db906c0d78efa0d..648ab3438657dc4a4ef36c60846a3c6810469ec4 100644 (file)
                                        $faviconURL = $urlParts['scheme'].'://'.$urlParts['host'].$linkUrl;
                                } else if (substr($linkUrl, 0, 7) == 'http://') {
                                        $faviconURL = $linkUrl;
+                               } else if (substr($url, -1, 1) == '/') {
+                                       $faviconURL = $url.$linkUrl;
                                } else {
-                                       $pos = strrpos($url, "/");
-                                       // no "/" in url or "/" is part of "://"
-                                       if ($pos === false || $pos == (strpos($url, "://")+2)) {
-                                               $faviconURL = $url.'/'.$linkUrl;
-                                       } else {
-                                               $faviconURL = substr($url, 0, $pos+1).$linkUrl;
-                                       }
+                                       $faviconURL = $url.'/'.$linkUrl;
                                }
 
                        } else {
 
                $http_response = fgets( $socket, 22 );
 
-               $responses = "/(200 OK)|(30[123])/";
+               $responses = "/(200 OK)|(30[0-9] Moved)/";
                if ( preg_match($responses, $http_response) ) {
                                fclose($socket);
                                return true;