summaryrefslogtreecommitdiffstats
path: root/utility/feedfetcher.php
diff options
context:
space:
mode:
Diffstat (limited to 'utility/feedfetcher.php')
-rw-r--r--utility/feedfetcher.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/utility/feedfetcher.php b/utility/feedfetcher.php
index 2c37aa4d7..0fa805883 100644
--- a/utility/feedfetcher.php
+++ b/utility/feedfetcher.php
@@ -139,14 +139,9 @@ class FeedFetcher {
//try to extract favicon from web page
$absoluteUrl = \SimplePie_Misc::absolutize_url('/', $url);
+ $page = \OC_Util::getUrlContent($absoluteUrl);
- $handle = curl_init ( );
- curl_setopt ( $handle, CURLOPT_URL, $absoluteUrl );
- curl_setopt ( $handle, CURLOPT_RETURNTRANSFER, 1 );
- curl_setopt ( $handle, CURLOPT_FOLLOWLOCATION, TRUE );
- curl_setopt ( $handle, CURLOPT_MAXREDIRS, 10 );
-
- if ( FALSE!==($page=curl_exec($handle)) ) {
+ if ( FALSE !== $page ) {
preg_match ( '/<[^>]*link[^>]*(rel=["\']icon["\']|rel=["\']shortcut icon["\']) .*href=["\']([^>]*)["\'].*>/iU', $page, $match );
if (1<sizeof($match)) {
// the specified uri might be an url, an absolute or a relative path