diff options
Diffstat (limited to 'classes/rssutils.php')
-rwxr-xr-x | classes/rssutils.php | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/classes/rssutils.php b/classes/rssutils.php index 750222c80..553d04561 100755 --- a/classes/rssutils.php +++ b/classes/rssutils.php @@ -256,14 +256,6 @@ class RSSUtils { FEED_FETCH_TIMEOUT, 0); - global $fetch_curl_used; - - if (!$fetch_curl_used) { - $tmp = @gzdecode($feed_data); - - if ($tmp) $feed_data = $tmp; - } - $feed_data = trim($feed_data); $rss = new FeedParser($feed_data); @@ -430,14 +422,6 @@ class RSSUtils { "last_modified" => $force_refetch ? "" : $stored_last_modified ]); - global $fetch_curl_used; - - if (!$fetch_curl_used) { - $tmp = @gzdecode($feed_data); - - if ($tmp) $feed_data = $tmp; - } - $feed_data = trim($feed_data); Debug::log("fetch done.", Debug::$LOG_VERBOSE); @@ -1602,6 +1586,8 @@ class RSSUtils { } } - + static function is_gzipped($feed_data) { + return mb_strpos($feed_data, "\x1f" . "\x8b" . "\x08", 0, "US-ASCII") === 0; + } } |