FeedOnFeeds/simplepie/simplepie.php.diff

1468 lines
67 KiB
Diff

--- simplepie.php.orig 2014-12-09 01:45:22.705342569 +0300
+++ simplepie.php 2014-12-09 01:45:29.873342765 +0300
@@ -43,6 +43,10 @@
* @todo phpDoc comments
*/
+/* added by FoF (vitalif@yourcmc.ru) to enable environment proxy settings support */
+/* fucking cURL doesn't support this by default */
+require_once(dirname(dirname(__FILE__)).'/curl-env-proxy.php');
+
/**
* SimplePie Name
*/
@@ -446,7 +450,7 @@ class SimplePie
* @see SimplePie::set_timeout()
* @access private
*/
- var $timeout = 10;
+ var $timeout = 60;
/**
* @var bool Forces fsockopen() to be used for remote files instead
@@ -708,7 +712,13 @@ class SimplePie
* @see SimplePie::strip_htmltags()
* @access private
*/
- var $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style');
+ var $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'font', 'form', 'frame', 'frameset', 'html', 'input', 'marquee', 'meta', 'noscript', 'script', 'style');
+
+ /**
+ * @var array Additional HTTP headers to retrieve feed
+ * @access public
+ */
+ var $headers = array();
/**
* The SimplePie class contains feed level data and options
@@ -734,7 +744,7 @@ class SimplePie
function SimplePie($feed_url = null, $cache_location = null, $cache_duration = null)
{
// Other objects, instances created here so we can set options on them
- $this->sanitize =& new SimplePie_Sanitize;
+ $this->sanitize = new SimplePie_Sanitize;
// Set options if they're passed to the constructor
if ($cache_location !== null)
@@ -1104,7 +1114,7 @@ class SimplePie
{
if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Sanitize'))
{
- $this->sanitize =& new $class;
+ $this->sanitize = new $class;
return true;
}
return false;
@@ -1533,6 +1543,7 @@ class SimplePie
if ($this->feed_url !== null || $this->raw_data !== null)
{
+ $headers = $this->headers;
$this->data = array();
$this->multifeed_objects = array();
$cache = false;
@@ -1589,7 +1600,6 @@ class SimplePie
// If we have last-modified and/or etag set
if (isset($this->data['headers']['last-modified']) || isset($this->data['headers']['etag']))
{
- $headers = array();
if (isset($this->data['headers']['last-modified']))
{
$headers['if-modified-since'] = $this->data['headers']['last-modified'];
@@ -1598,7 +1608,7 @@ class SimplePie
{
$headers['if-none-match'] = '"' . $this->data['headers']['etag'] . '"';
}
- $file =& new $this->file_class($this->feed_url, $this->timeout/10, 5, $headers, $this->useragent, $this->force_fsockopen);
+ $file = new $this->file_class($this->feed_url, $this->timeout/10, 5, $headers, $this->useragent, $this->force_fsockopen);
if ($file->success)
{
if ($file->status_code === 304)
@@ -1639,7 +1649,7 @@ class SimplePie
}
else
{
- $file =& new $this->file_class($this->feed_url, $this->timeout, 5, null, $this->useragent, $this->force_fsockopen);
+ $file = new $this->file_class($this->feed_url, $this->timeout, 5, $headers, $this->useragent, $this->force_fsockopen);
}
}
// If the file connection has an error, set SimplePie::error to that and quit
@@ -1659,9 +1669,16 @@ class SimplePie
if (!$this->force_feed)
{
// Check if the supplied URL is a feed, if it isn't, look for it.
- $locate =& new $this->locator_class($file, $this->timeout, $this->useragent, $this->file_class, $this->max_checked_feeds, $this->content_type_sniffer_class);
+ $locate = new $this->locator_class($file, $this->timeout, $this->useragent, $this->file_class, $this->max_checked_feeds, $this->content_type_sniffer_class);
+ $locate->headers = $headers;
if (!$locate->is_feed($file))
{
+ if ($file->status_code == 401)
+ {
+ $this->error = "HTTP 401 Unauthorized. Retry with correct login/password";
+ SimplePie_Misc::error($this->error, E_USER_NOTICE, __FILE__, __LINE__);
+ return false;
+ }
// We need to unset this so that if SimplePie::set_file() has been called that object is untouched
unset($file);
if ($file = $locate->find($this->autodiscovery, $this->all_discovered_feeds))
@@ -1689,7 +1706,7 @@ class SimplePie
$headers = $file->headers;
$data = $file->body;
- $sniffer =& new $this->content_type_sniffer_class($file);
+ $sniffer = new $this->content_type_sniffer_class($file);
$sniffed = $sniffer->get_type();
}
else
@@ -1759,7 +1776,7 @@ class SimplePie
if ($utf8_data = SimplePie_Misc::change_encoding($data, $encoding, 'UTF-8'))
{
// Create new parser
- $parser =& new $this->parser_class();
+ $parser = new $this->parser_class();
// If it's parsed fine
if ($parser->parse($utf8_data, 'UTF-8'))
@@ -1970,11 +1987,11 @@ class SimplePie
}
else
{
- $file =& new $this->file_class($favicon, $this->timeout / 10, 5, array('X-FORWARDED-FOR' => $_SERVER['REMOTE_ADDR']), $this->useragent, $this->force_fsockopen);
+ $file = new $this->file_class($favicon, $this->timeout / 10, 5, array('X-FORWARDED-FOR' => $_SERVER['REMOTE_ADDR']), $this->useragent, $this->force_fsockopen);
if ($file->success && ($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($file->status_code === 200 || $file->status_code > 206 && $file->status_code < 300)) && strlen($file->body) > 0)
{
- $sniffer =& new $this->content_type_sniffer_class($file);
+ $sniffer = new $this->content_type_sniffer_class($file);
if (substr($sniffer->get_type(), 0, 6) === 'image/')
{
if ($cache->save(array('headers' => $file->headers, 'body' => $file->body)))
@@ -2373,7 +2390,7 @@ class SimplePie
{
$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $categories[] =& new $this->category_class($term, $scheme, $label);
+ $categories[] = new $this->category_class($term, $scheme, $label);
}
foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'category') as $category)
{
@@ -2388,15 +2405,15 @@ class SimplePie
{
$scheme = null;
}
- $categories[] =& new $this->category_class($term, $scheme, null);
+ $categories[] = new $this->category_class($term, $scheme, null);
}
foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'subject') as $category)
{
- $categories[] =& new $this->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
+ $categories[] = new $this->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
}
foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'subject') as $category)
{
- $categories[] =& new $this->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
+ $categories[] = new $this->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
}
if (!empty($categories))
@@ -2444,7 +2461,7 @@ class SimplePie
}
if ($name !== null || $email !== null || $uri !== null)
{
- $authors[] =& new $this->author_class($name, $uri, $email);
+ $authors[] = new $this->author_class($name, $uri, $email);
}
}
if ($author = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'author'))
@@ -2466,20 +2483,20 @@ class SimplePie
}
if ($name !== null || $email !== null || $url !== null)
{
- $authors[] =& new $this->author_class($name, $url, $email);
+ $authors[] = new $this->author_class($name, $url, $email);
}
}
foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'creator') as $author)
{
- $authors[] =& new $this->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
+ $authors[] = new $this->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
}
foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'creator') as $author)
{
- $authors[] =& new $this->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
+ $authors[] = new $this->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
}
foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'author') as $author)
{
- $authors[] =& new $this->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
+ $authors[] = new $this->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
}
if (!empty($authors))
@@ -2527,7 +2544,7 @@ class SimplePie
}
if ($name !== null || $email !== null || $uri !== null)
{
- $contributors[] =& new $this->author_class($name, $uri, $email);
+ $contributors[] = new $this->author_class($name, $uri, $email);
}
}
foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'contributor') as $contributor)
@@ -2549,7 +2566,7 @@ class SimplePie
}
if ($name !== null || $email !== null || $url !== null)
{
- $contributors[] =& new $this->author_class($name, $url, $email);
+ $contributors[] = new $this->author_class($name, $url, $email);
}
}
@@ -2962,7 +2979,7 @@ class SimplePie
$keys = array_keys($items);
foreach ($keys as $key)
{
- $this->data['items'][] =& new $this->item_class($this, $items[$key]);
+ $this->data['items'][] = new $this->item_class($this, $items[$key]);
}
}
if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'entry'))
@@ -2970,7 +2987,7 @@ class SimplePie
$keys = array_keys($items);
foreach ($keys as $key)
{
- $this->data['items'][] =& new $this->item_class($this, $items[$key]);
+ $this->data['items'][] = new $this->item_class($this, $items[$key]);
}
}
if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'item'))
@@ -2978,7 +2995,7 @@ class SimplePie
$keys = array_keys($items);
foreach ($keys as $key)
{
- $this->data['items'][] =& new $this->item_class($this, $items[$key]);
+ $this->data['items'][] = new $this->item_class($this, $items[$key]);
}
}
if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'item'))
@@ -2986,7 +3003,7 @@ class SimplePie
$keys = array_keys($items);
foreach ($keys as $key)
{
- $this->data['items'][] =& new $this->item_class($this, $items[$key]);
+ $this->data['items'][] = new $this->item_class($this, $items[$key]);
}
}
if ($items = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'item'))
@@ -2994,7 +3011,7 @@ class SimplePie
$keys = array_keys($items);
foreach ($keys as $key)
{
- $this->data['items'][] =& new $this->item_class($this, $items[$key]);
+ $this->data['items'][] = new $this->item_class($this, $items[$key]);
}
}
}
@@ -3049,7 +3066,7 @@ class SimplePie
/**
* @static
*/
- function sort_items($a, $b)
+ static function sort_items($a, $b)
{
return $a->get_date('U') <= $b->get_date('U');
}
@@ -3057,7 +3074,7 @@ class SimplePie
/**
* @static
*/
- function merge_items($urls, $start = 0, $end = 0, $limit = 0)
+ static function merge_items($urls, $start = 0, $end = 0, $limit = 0)
{
if (is_array($urls) && sizeof($urls) > 0)
{
@@ -3345,7 +3362,7 @@ class SimplePie_Item
{
$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $categories[] =& new $this->feed->category_class($term, $scheme, $label);
+ $categories[] = new $this->feed->category_class($term, $scheme, $label);
}
foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'category') as $category)
{
@@ -3360,15 +3377,15 @@ class SimplePie_Item
{
$scheme = null;
}
- $categories[] =& new $this->feed->category_class($term, $scheme, null);
+ $categories[] = new $this->feed->category_class($term, $scheme, null);
}
foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'subject') as $category)
{
- $categories[] =& new $this->feed->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
+ $categories[] = new $this->feed->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
}
foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'subject') as $category)
{
- $categories[] =& new $this->feed->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
+ $categories[] = new $this->feed->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
}
if (!empty($categories))
@@ -3429,7 +3446,7 @@ class SimplePie_Item
}
if ($name !== null || $email !== null || $uri !== null)
{
- $contributors[] =& new $this->feed->author_class($name, $uri, $email);
+ $contributors[] = new $this->feed->author_class($name, $uri, $email);
}
}
foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'contributor') as $contributor)
@@ -3451,7 +3468,7 @@ class SimplePie_Item
}
if ($name !== null || $email !== null || $url !== null)
{
- $contributors[] =& new $this->feed->author_class($name, $url, $email);
+ $contributors[] = new $this->feed->author_class($name, $url, $email);
}
}
@@ -3487,7 +3504,7 @@ class SimplePie_Item
}
if ($name !== null || $email !== null || $uri !== null)
{
- $authors[] =& new $this->feed->author_class($name, $uri, $email);
+ $authors[] = new $this->feed->author_class($name, $uri, $email);
}
}
if ($author = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'author'))
@@ -3509,24 +3526,24 @@ class SimplePie_Item
}
if ($name !== null || $email !== null || $url !== null)
{
- $authors[] =& new $this->feed->author_class($name, $url, $email);
+ $authors[] = new $this->feed->author_class($name, $url, $email);
}
}
if ($author = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'author'))
{
- $authors[] =& new $this->feed->author_class(null, null, $this->sanitize($author[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
+ $authors[] = new $this->feed->author_class(null, null, $this->sanitize($author[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
}
foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'creator') as $author)
{
- $authors[] =& new $this->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
+ $authors[] = new $this->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
}
foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'creator') as $author)
{
- $authors[] =& new $this->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
+ $authors[] = new $this->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
}
foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'author') as $author)
{
- $authors[] =& new $this->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
+ $authors[] = new $this->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
}
if (!empty($authors))
@@ -3836,7 +3853,7 @@ class SimplePie_Item
{
$caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $captions_parent[] =& new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text);
+ $captions_parent[] = new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text);
}
}
elseif ($captions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'text'))
@@ -3868,7 +3885,7 @@ class SimplePie_Item
{
$caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $captions_parent[] =& new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text);
+ $captions_parent[] = new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text);
}
}
if (is_array($captions_parent))
@@ -3898,7 +3915,7 @@ class SimplePie_Item
{
$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $categories_parent[] =& new $this->feed->category_class($term, $scheme, $label);
+ $categories_parent[] = new $this->feed->category_class($term, $scheme, $label);
}
foreach ((array) $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'category') as $category)
{
@@ -3921,7 +3938,7 @@ class SimplePie_Item
{
$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $categories_parent[] =& new $this->feed->category_class($term, $scheme, $label);
+ $categories_parent[] = new $this->feed->category_class($term, $scheme, $label);
}
foreach ((array) $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'category') as $category)
{
@@ -3932,7 +3949,7 @@ class SimplePie_Item
{
$label = $this->sanitize($category['attribs']['']['text'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $categories_parent[] =& new $this->feed->category_class($term, $scheme, $label);
+ $categories_parent[] = new $this->feed->category_class($term, $scheme, $label);
if (isset($category['child'][SIMPLEPIE_NAMESPACE_ITUNES]['category']))
{
@@ -3942,7 +3959,7 @@ class SimplePie_Item
{
$label = $this->sanitize($subcategory['attribs']['']['text'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $categories_parent[] =& new $this->feed->category_class($term, $scheme, $label);
+ $categories_parent[] = new $this->feed->category_class($term, $scheme, $label);
}
}
}
@@ -3964,7 +3981,7 @@ class SimplePie_Item
{
$copyright_label = $this->sanitize($copyright[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $copyrights_parent =& new $this->feed->copyright_class($copyright_url, $copyright_label);
+ $copyrights_parent = new $this->feed->copyright_class($copyright_url, $copyright_label);
}
elseif ($copyright = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'copyright'))
{
@@ -3978,7 +3995,7 @@ class SimplePie_Item
{
$copyright_label = $this->sanitize($copyright[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $copyrights_parent =& new $this->feed->copyright_class($copyright_url, $copyright_label);
+ $copyrights_parent = new $this->feed->copyright_class($copyright_url, $copyright_label);
}
// CREDITS
@@ -4005,7 +4022,7 @@ class SimplePie_Item
{
$credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $credits_parent[] =& new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name);
+ $credits_parent[] = new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name);
}
}
elseif ($credits = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'credit'))
@@ -4031,7 +4048,7 @@ class SimplePie_Item
{
$credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $credits_parent[] =& new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name);
+ $credits_parent[] = new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name);
}
}
if (is_array($credits_parent))
@@ -4220,7 +4237,7 @@ class SimplePie_Item
{
$rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $ratings_parent[] =& new $this->feed->rating_class($rating_scheme, $rating_value);
+ $ratings_parent[] = new $this->feed->rating_class($rating_scheme, $rating_value);
}
}
elseif ($ratings = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'explicit'))
@@ -4233,7 +4250,7 @@ class SimplePie_Item
{
$rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $ratings_parent[] =& new $this->feed->rating_class($rating_scheme, $rating_value);
+ $ratings_parent[] = new $this->feed->rating_class($rating_scheme, $rating_value);
}
}
elseif ($ratings = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'rating'))
@@ -4254,7 +4271,7 @@ class SimplePie_Item
{
$rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $ratings_parent[] =& new $this->feed->rating_class($rating_scheme, $rating_value);
+ $ratings_parent[] = new $this->feed->rating_class($rating_scheme, $rating_value);
}
}
elseif ($ratings = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'explicit'))
@@ -4267,7 +4284,7 @@ class SimplePie_Item
{
$rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $ratings_parent[] =& new $this->feed->rating_class($rating_scheme, $rating_value);
+ $ratings_parent[] = new $this->feed->rating_class($rating_scheme, $rating_value);
}
}
if (is_array($ratings_parent))
@@ -4295,7 +4312,7 @@ class SimplePie_Item
{
$restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $restrictions_parent[] =& new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
+ $restrictions_parent[] = new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
}
}
elseif ($restrictions = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'block'))
@@ -4309,7 +4326,7 @@ class SimplePie_Item
{
$restriction_relationship = 'deny';
}
- $restrictions_parent[] =& new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
+ $restrictions_parent[] = new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
}
}
elseif ($restrictions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'restriction'))
@@ -4331,7 +4348,7 @@ class SimplePie_Item
{
$restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $restrictions_parent[] =& new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
+ $restrictions_parent[] = new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
}
}
elseif ($restrictions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'block'))
@@ -4345,7 +4362,7 @@ class SimplePie_Item
{
$restriction_relationship = 'deny';
}
- $restrictions_parent[] =& new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
+ $restrictions_parent[] = new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
}
}
if (is_array($restrictions_parent))
@@ -4549,7 +4566,7 @@ class SimplePie_Item
{
$caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $captions[] =& new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text);
+ $captions[] = new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text);
}
if (is_array($captions))
{
@@ -4585,7 +4602,7 @@ class SimplePie_Item
{
$caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $captions[] =& new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text);
+ $captions[] = new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text);
}
if (is_array($captions))
{
@@ -4621,7 +4638,7 @@ class SimplePie_Item
{
$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $categories[] =& new $this->feed->category_class($term, $scheme, $label);
+ $categories[] = new $this->feed->category_class($term, $scheme, $label);
}
}
if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category']))
@@ -4647,7 +4664,7 @@ class SimplePie_Item
{
$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $categories[] =& new $this->feed->category_class($term, $scheme, $label);
+ $categories[] = new $this->feed->category_class($term, $scheme, $label);
}
}
if (is_array($categories) && is_array($categories_parent))
@@ -4676,7 +4693,7 @@ class SimplePie_Item
{
$copyright_label = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $copyrights =& new $this->feed->copyright_class($copyright_url, $copyright_label);
+ $copyrights = new $this->feed->copyright_class($copyright_url, $copyright_label);
}
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright']))
{
@@ -4690,7 +4707,7 @@ class SimplePie_Item
{
$copyright_label = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $copyrights =& new $this->feed->copyright_class($copyright_url, $copyright_label);
+ $copyrights = new $this->feed->copyright_class($copyright_url, $copyright_label);
}
else
{
@@ -4721,7 +4738,7 @@ class SimplePie_Item
{
$credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $credits[] =& new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name);
+ $credits[] = new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name);
}
if (is_array($credits))
{
@@ -4751,7 +4768,7 @@ class SimplePie_Item
{
$credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $credits[] =& new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name);
+ $credits[] = new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name);
}
if (is_array($credits))
{
@@ -4904,7 +4921,7 @@ class SimplePie_Item
{
$rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $ratings[] =& new $this->feed->rating_class($rating_scheme, $rating_value);
+ $ratings[] = new $this->feed->rating_class($rating_scheme, $rating_value);
}
if (is_array($ratings))
{
@@ -4929,7 +4946,7 @@ class SimplePie_Item
{
$rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $ratings[] =& new $this->feed->rating_class($rating_scheme, $rating_value);
+ $ratings[] = new $this->feed->rating_class($rating_scheme, $rating_value);
}
if (is_array($ratings))
{
@@ -4961,7 +4978,7 @@ class SimplePie_Item
{
$restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $restrictions[] =& new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
+ $restrictions[] = new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
}
if (is_array($restrictions))
{
@@ -4987,7 +5004,7 @@ class SimplePie_Item
{
$restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $restrictions[] =& new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
+ $restrictions[] = new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
}
if (is_array($restrictions))
{
@@ -5041,7 +5058,7 @@ class SimplePie_Item
$title = $title_parent;
}
- $this->data['enclosures'][] =& new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions, $categories, $channels, $copyrights, $credits, $description, $duration, $expression, $framerate, $hashes, $height, $keywords, $lang, $medium, $player, $ratings, $restrictions, $samplingrate, $thumbnails, $title, $width);
+ $this->data['enclosures'][] = new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions, $categories, $channels, $copyrights, $credits, $description, $duration, $expression, $framerate, $hashes, $height, $keywords, $lang, $medium, $player, $ratings, $restrictions, $samplingrate, $thumbnails, $title, $width);
}
}
}
@@ -5170,7 +5187,7 @@ class SimplePie_Item
{
$caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $captions[] =& new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text);
+ $captions[] = new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text);
}
if (is_array($captions))
{
@@ -5206,7 +5223,7 @@ class SimplePie_Item
{
$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $categories[] =& new $this->feed->category_class($term, $scheme, $label);
+ $categories[] = new $this->feed->category_class($term, $scheme, $label);
}
}
if (is_array($categories) && is_array($categories_parent))
@@ -5239,7 +5256,7 @@ class SimplePie_Item
{
$copyright_label = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $copyrights =& new $this->feed->copyright_class($copyright_url, $copyright_label);
+ $copyrights = new $this->feed->copyright_class($copyright_url, $copyright_label);
}
else
{
@@ -5270,7 +5287,7 @@ class SimplePie_Item
{
$credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $credits[] =& new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name);
+ $credits[] = new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name);
}
if (is_array($credits))
{
@@ -5374,7 +5391,7 @@ class SimplePie_Item
{
$rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $ratings[] =& new $this->feed->rating_class($rating_scheme, $rating_value);
+ $ratings[] = new $this->feed->rating_class($rating_scheme, $rating_value);
}
if (is_array($ratings))
{
@@ -5406,7 +5423,7 @@ class SimplePie_Item
{
$restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $restrictions[] =& new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
+ $restrictions[] = new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
}
if (is_array($restrictions))
{
@@ -5445,7 +5462,7 @@ class SimplePie_Item
$title = $title_parent;
}
- $this->data['enclosures'][] =& new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions, $categories, $channels, $copyrights, $credits, $description, $duration, $expression, $framerate, $hashes, $height, $keywords, $lang, $medium, $player, $ratings, $restrictions, $samplingrate, $thumbnails, $title, $width);
+ $this->data['enclosures'][] = new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions, $categories, $channels, $copyrights, $credits, $description, $duration, $expression, $framerate, $hashes, $height, $keywords, $lang, $medium, $player, $ratings, $restrictions, $samplingrate, $thumbnails, $title, $width);
}
}
}
@@ -5481,7 +5498,7 @@ class SimplePie_Item
}
// Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor
- $this->data['enclosures'][] =& new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width);
+ $this->data['enclosures'][] = new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width);
}
}
@@ -5516,7 +5533,7 @@ class SimplePie_Item
}
// Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor
- $this->data['enclosures'][] =& new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width);
+ $this->data['enclosures'][] = new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width);
}
}
@@ -5551,14 +5568,14 @@ class SimplePie_Item
}
// Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor
- $this->data['enclosures'][] =& new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width);
+ $this->data['enclosures'][] = new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width);
}
}
if (sizeof($this->data['enclosures']) === 0 && ($url || $type || $length || $bitrate || $captions_parent || $categories_parent || $channels || $copyrights_parent || $credits_parent || $description_parent || $duration_parent || $expression || $framerate || $hashes_parent || $height || $keywords_parent || $lang || $medium || $player_parent || $ratings_parent || $restrictions_parent || $samplingrate || $thumbnails_parent || $title_parent || $width))
{
// Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor
- $this->data['enclosures'][] =& new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width);
+ $this->data['enclosures'][] = new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width);
}
$this->data['enclosures'] = array_values(SimplePie_Misc::array_unique($this->data['enclosures']));
@@ -5835,7 +5852,7 @@ class SimplePie_Source
{
$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $categories[] =& new $this->item->feed->category_class($term, $scheme, $label);
+ $categories[] = new $this->item->feed->category_class($term, $scheme, $label);
}
foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'category') as $category)
{
@@ -5850,15 +5867,15 @@ class SimplePie_Source
{
$scheme = null;
}
- $categories[] =& new $this->item->feed->category_class($term, $scheme, null);
+ $categories[] = new $this->item->feed->category_class($term, $scheme, null);
}
foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'subject') as $category)
{
- $categories[] =& new $this->item->feed->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
+ $categories[] = new $this->item->feed->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
}
foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'subject') as $category)
{
- $categories[] =& new $this->item->feed->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
+ $categories[] = new $this->item->feed->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
}
if (!empty($categories))
@@ -5906,7 +5923,7 @@ class SimplePie_Source
}
if ($name !== null || $email !== null || $uri !== null)
{
- $authors[] =& new $this->item->feed->author_class($name, $uri, $email);
+ $authors[] = new $this->item->feed->author_class($name, $uri, $email);
}
}
if ($author = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'author'))
@@ -5928,20 +5945,20 @@ class SimplePie_Source
}
if ($name !== null || $email !== null || $url !== null)
{
- $authors[] =& new $this->item->feed->author_class($name, $url, $email);
+ $authors[] = new $this->item->feed->author_class($name, $url, $email);
}
}
foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'creator') as $author)
{
- $authors[] =& new $this->item->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
+ $authors[] = new $this->item->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
}
foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'creator') as $author)
{
- $authors[] =& new $this->item->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
+ $authors[] = new $this->item->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
}
foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'author') as $author)
{
- $authors[] =& new $this->item->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
+ $authors[] = new $this->item->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null);
}
if (!empty($authors))
@@ -5989,7 +6006,7 @@ class SimplePie_Source
}
if ($name !== null || $email !== null || $uri !== null)
{
- $contributors[] =& new $this->item->feed->author_class($name, $uri, $email);
+ $contributors[] = new $this->item->feed->author_class($name, $uri, $email);
}
}
foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'contributor') as $contributor)
@@ -6011,7 +6028,7 @@ class SimplePie_Source
}
if ($name !== null || $email !== null || $url !== null)
{
- $contributors[] =& new $this->item->feed->author_class($name, $url, $email);
+ $contributors[] = new $this->item->feed->author_class($name, $url, $email);
}
}
@@ -6448,7 +6465,7 @@ class SimplePie_Enclosure
$this->width = $width;
if (class_exists('idna_convert'))
{
- $idn =& new idna_convert;
+ $idn = new idna_convert;
$parsed = SimplePie_Misc::parse_url($link);
$this->link = SimplePie_Misc::compress_parse_url($parsed['scheme'], $idn->encode($parsed['authority']), $parsed['path'], $parsed['query'], $parsed['fragment']);
}
@@ -7655,7 +7672,7 @@ class SimplePie_File
{
if (class_exists('idna_convert'))
{
- $idn =& new idna_convert;
+ $idn = new idna_convert;
$parsed = SimplePie_Misc::parse_url($url);
$url = SimplePie_Misc::compress_parse_url($parsed['scheme'], $idn->encode($parsed['authority']), $parsed['path'], $parsed['query'], $parsed['fragment']);
}
@@ -7687,6 +7704,15 @@ class SimplePie_File
{
curl_setopt($fp, CURLOPT_ENCODING, '');
}
+ if (preg_match('#^([a-z0-9_]+://)(?:([^/]*:[^/]*)@)([^/@]+([/\?].*)?$)#is', $url, $m))
+ {
+ $url = $m[1].$m[3];
+ curl_setopt($fp, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
+ curl_setopt($fp, CURLOPT_USERPWD, urldecode($m[2]));
+ }
+ // added by FoF (vitalif@yourcmc.ru) to enable environment proxy settings support
+ // fucking cURL doesn't support this by default
+ CurlEnvProxy::set($fp, $url);
curl_setopt($fp, CURLOPT_URL, $url);
curl_setopt($fp, CURLOPT_HEADER, 1);
curl_setopt($fp, CURLOPT_RETURNTRANSFER, 1);
@@ -7701,6 +7727,10 @@ class SimplePie_File
curl_setopt($fp, CURLOPT_MAXREDIRS, $redirects);
}
+ // added by FoF to enable https and digest authentication
+ curl_setopt($fp, CURLOPT_SSL_VERIFYPEER, false);
+ curl_setopt($fp, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
+
$this->headers = curl_exec($fp);
if (curl_errno($fp) === 23 || curl_errno($fp) === 61)
{
@@ -7718,7 +7748,7 @@ class SimplePie_File
curl_close($fp);
$this->headers = explode("\r\n\r\n", $this->headers, $info['redirect_count'] + 1);
$this->headers = array_pop($this->headers);
- $parser =& new SimplePie_HTTP_Parser($this->headers);
+ $parser = new SimplePie_HTTP_Parser($this->headers);
if ($parser->parse())
{
$this->headers = $parser->headers;
@@ -7799,7 +7829,7 @@ class SimplePie_File
}
if (!$info['timed_out'])
{
- $parser =& new SimplePie_HTTP_Parser($this->headers);
+ $parser = new SimplePie_HTTP_Parser($this->headers);
if ($parser->parse())
{
$this->headers = $parser->headers;
@@ -7818,7 +7848,7 @@ class SimplePie_File
{
case 'gzip':
case 'x-gzip':
- $decoder =& new SimplePie_gzdecode($this->body);
+ $decoder = new SimplePie_gzdecode($this->body);
if (!$decoder->parse())
{
$this->error = 'Unable to decode HTTP "gzip" stream';
@@ -8628,9 +8658,9 @@ class SimplePie_Cache
* @static
* @access public
*/
- function create($location, $filename, $extension)
+ static function create($location, $filename, $extension)
{
- $location_iri =& new SimplePie_IRI($location);
+ $location_iri = new SimplePie_IRI($location);
switch ($location_iri->get_scheme())
{
case 'mysql':
@@ -9081,7 +9111,7 @@ class SimplePie_Cache_MySQL extends Simp
class SimplePie_Misc
{
- function time_hms($seconds)
+ static function time_hms($seconds)
{
$time = '';
@@ -9109,13 +9139,13 @@ class SimplePie_Misc
return $time;
}
- function absolutize_url($relative, $base)
+ static function absolutize_url($relative, $base)
{
$iri = SimplePie_IRI::absolutize(new SimplePie_IRI($base), $relative);
return $iri->get_iri();
}
- function remove_dot_segments($input)
+ static function remove_dot_segments($input)
{
$output = '';
while (strpos($input, './') !== false || strpos($input, '/.') !== false || $input === '.' || $input === '..')
@@ -9169,7 +9199,7 @@ class SimplePie_Misc
return $output . $input;
}
- function get_element($realname, $string)
+ static function get_element($realname, $string)
{
$return = array();
$name = preg_quote($realname, '/');
@@ -9206,7 +9236,7 @@ class SimplePie_Misc
return $return;
}
- function element_implode($element)
+ static function element_implode($element)
{
$full = "<$element[tag]";
foreach ($element['attribs'] as $key => $value)
@@ -9225,7 +9255,7 @@ class SimplePie_Misc
return $full;
}
- function error($message, $level, $file, $line)
+ static function error($message, $level, $file, $line)
{
if ((ini_get('error_reporting') & $level) > 0)
{
@@ -9271,7 +9301,7 @@ class SimplePie_Misc
* @param str $cache_name_function Obsolete. Exists for backwards
* compatibility reasons only.
*/
- function display_cached_file($identifier_url, $cache_location = './cache', $cache_extension = 'spc', $cache_class = 'SimplePie_Cache', $cache_name_function = 'md5')
+ static function display_cached_file($identifier_url, $cache_location = './cache', $cache_extension = 'spc', $cache_class = 'SimplePie_Cache', $cache_name_function = 'md5')
{
$cache = call_user_func(array($cache_class, 'create'), $cache_location, $identifier_url, $cache_extension);
@@ -9293,7 +9323,7 @@ class SimplePie_Misc
die('Cached file for ' . $identifier_url . ' cannot be found.');
}
- function fix_protocol($url, $http = 1)
+ static function fix_protocol($url, $http = 1)
{
$url = SimplePie_Misc::normalize_url($url);
$parsed = SimplePie_Misc::parse_url($url);
@@ -9325,9 +9355,9 @@ class SimplePie_Misc
}
}
- function parse_url($url)
+ static function parse_url($url)
{
- $iri =& new SimplePie_IRI($url);
+ $iri = new SimplePie_IRI($url);
return array(
'scheme' => (string) $iri->get_scheme(),
'authority' => (string) $iri->get_authority(),
@@ -9337,9 +9367,9 @@ class SimplePie_Misc
);
}
- function compress_parse_url($scheme = '', $authority = '', $path = '', $query = '', $fragment = '')
+ static function compress_parse_url($scheme = '', $authority = '', $path = '', $query = '', $fragment = '')
{
- $iri =& new SimplePie_IRI('');
+ $iri = new SimplePie_IRI('');
$iri->set_scheme($scheme);
$iri->set_authority($authority);
$iri->set_path($path);
@@ -9348,13 +9378,13 @@ class SimplePie_Misc
return $iri->get_iri();
}
- function normalize_url($url)
+ static function normalize_url($url)
{
- $iri =& new SimplePie_IRI($url);
+ $iri = new SimplePie_IRI($url);
return $iri->get_iri();
}
- function percent_encoding_normalization($match)
+ static function percent_encoding_normalization($match)
{
$integer = hexdec($match[1]);
if ($integer >= 0x41 && $integer <= 0x5A || $integer >= 0x61 && $integer <= 0x7A || $integer >= 0x30 && $integer <= 0x39 || $integer === 0x2D || $integer === 0x2E || $integer === 0x5F || $integer === 0x7E)
@@ -9378,7 +9408,7 @@ class SimplePie_Misc
* @param string $str String to remove bad UTF-8 bytes from
* @return string UTF-8 string
*/
- function utf8_bad_replace($str)
+ static function utf8_bad_replace($str)
{
if (function_exists('iconv') && ($return = @iconv('UTF-8', 'UTF-8//IGNORE', $str)))
{
@@ -9410,14 +9440,14 @@ class SimplePie_Misc
* @param string $string Windows-1252 encoded string
* @return string UTF-8 encoded string
*/
- function windows_1252_to_utf8($string)
+ static function windows_1252_to_utf8($string)
{
static $convert_table = array("\x80" => "\xE2\x82\xAC", "\x81" => "\xEF\xBF\xBD", "\x82" => "\xE2\x80\x9A", "\x83" => "\xC6\x92", "\x84" => "\xE2\x80\x9E", "\x85" => "\xE2\x80\xA6", "\x86" => "\xE2\x80\xA0", "\x87" => "\xE2\x80\xA1", "\x88" => "\xCB\x86", "\x89" => "\xE2\x80\xB0", "\x8A" => "\xC5\xA0", "\x8B" => "\xE2\x80\xB9", "\x8C" => "\xC5\x92", "\x8D" => "\xEF\xBF\xBD", "\x8E" => "\xC5\xBD", "\x8F" => "\xEF\xBF\xBD", "\x90" => "\xEF\xBF\xBD", "\x91" => "\xE2\x80\x98", "\x92" => "\xE2\x80\x99", "\x93" => "\xE2\x80\x9C", "\x94" => "\xE2\x80\x9D", "\x95" => "\xE2\x80\xA2", "\x96" => "\xE2\x80\x93", "\x97" => "\xE2\x80\x94", "\x98" => "\xCB\x9C", "\x99" => "\xE2\x84\xA2", "\x9A" => "\xC5\xA1", "\x9B" => "\xE2\x80\xBA", "\x9C" => "\xC5\x93", "\x9D" => "\xEF\xBF\xBD", "\x9E" => "\xC5\xBE", "\x9F" => "\xC5\xB8", "\xA0" => "\xC2\xA0", "\xA1" => "\xC2\xA1", "\xA2" => "\xC2\xA2", "\xA3" => "\xC2\xA3", "\xA4" => "\xC2\xA4", "\xA5" => "\xC2\xA5", "\xA6" => "\xC2\xA6", "\xA7" => "\xC2\xA7", "\xA8" => "\xC2\xA8", "\xA9" => "\xC2\xA9", "\xAA" => "\xC2\xAA", "\xAB" => "\xC2\xAB", "\xAC" => "\xC2\xAC", "\xAD" => "\xC2\xAD", "\xAE" => "\xC2\xAE", "\xAF" => "\xC2\xAF", "\xB0" => "\xC2\xB0", "\xB1" => "\xC2\xB1", "\xB2" => "\xC2\xB2", "\xB3" => "\xC2\xB3", "\xB4" => "\xC2\xB4", "\xB5" => "\xC2\xB5", "\xB6" => "\xC2\xB6", "\xB7" => "\xC2\xB7", "\xB8" => "\xC2\xB8", "\xB9" => "\xC2\xB9", "\xBA" => "\xC2\xBA", "\xBB" => "\xC2\xBB", "\xBC" => "\xC2\xBC", "\xBD" => "\xC2\xBD", "\xBE" => "\xC2\xBE", "\xBF" => "\xC2\xBF", "\xC0" => "\xC3\x80", "\xC1" => "\xC3\x81", "\xC2" => "\xC3\x82", "\xC3" => "\xC3\x83", "\xC4" => "\xC3\x84", "\xC5" => "\xC3\x85", "\xC6" => "\xC3\x86", "\xC7" => "\xC3\x87", "\xC8" => "\xC3\x88", "\xC9" => "\xC3\x89", "\xCA" => "\xC3\x8A", "\xCB" => "\xC3\x8B", "\xCC" => "\xC3\x8C", "\xCD" => "\xC3\x8D", "\xCE" => "\xC3\x8E", "\xCF" => "\xC3\x8F", "\xD0" => "\xC3\x90", "\xD1" => "\xC3\x91", "\xD2" => "\xC3\x92", "\xD3" => "\xC3\x93", "\xD4" => "\xC3\x94", "\xD5" => "\xC3\x95", "\xD6" => "\xC3\x96", "\xD7" => "\xC3\x97", "\xD8" => "\xC3\x98", "\xD9" => "\xC3\x99", "\xDA" => "\xC3\x9A", "\xDB" => "\xC3\x9B", "\xDC" => "\xC3\x9C", "\xDD" => "\xC3\x9D", "\xDE" => "\xC3\x9E", "\xDF" => "\xC3\x9F", "\xE0" => "\xC3\xA0", "\xE1" => "\xC3\xA1", "\xE2" => "\xC3\xA2", "\xE3" => "\xC3\xA3", "\xE4" => "\xC3\xA4", "\xE5" => "\xC3\xA5", "\xE6" => "\xC3\xA6", "\xE7" => "\xC3\xA7", "\xE8" => "\xC3\xA8", "\xE9" => "\xC3\xA9", "\xEA" => "\xC3\xAA", "\xEB" => "\xC3\xAB", "\xEC" => "\xC3\xAC", "\xED" => "\xC3\xAD", "\xEE" => "\xC3\xAE", "\xEF" => "\xC3\xAF", "\xF0" => "\xC3\xB0", "\xF1" => "\xC3\xB1", "\xF2" => "\xC3\xB2", "\xF3" => "\xC3\xB3", "\xF4" => "\xC3\xB4", "\xF5" => "\xC3\xB5", "\xF6" => "\xC3\xB6", "\xF7" => "\xC3\xB7", "\xF8" => "\xC3\xB8", "\xF9" => "\xC3\xB9", "\xFA" => "\xC3\xBA", "\xFB" => "\xC3\xBB", "\xFC" => "\xC3\xBC", "\xFD" => "\xC3\xBD", "\xFE" => "\xC3\xBE", "\xFF" => "\xC3\xBF");
return strtr($string, $convert_table);
}
- function change_encoding($data, $input, $output)
+ static function change_encoding($data, $input, $output)
{
$input = SimplePie_Misc::encoding($input);
$output = SimplePie_Misc::encoding($output);
@@ -9458,7 +9488,7 @@ class SimplePie_Misc
}
}
- function encoding($charset)
+ static function encoding($charset)
{
// Normalization from UTS #22
switch (strtolower(preg_replace('/(?:[^a-zA-Z0-9]+|([^0-9])0+)/', '\1', $charset)))
@@ -10774,7 +10804,7 @@ class SimplePie_Misc
}
}
- function get_curl_version()
+ static function get_curl_version()
{
if (is_array($curl = curl_version()))
{
@@ -10795,7 +10825,7 @@ class SimplePie_Misc
return $curl;
}
- function is_subclass_of($class1, $class2)
+ static function is_subclass_of($class1, $class2)
{
if (func_num_args() !== 2)
{
@@ -10836,7 +10866,7 @@ class SimplePie_Misc
* @param string $data Data to strip comments from
* @return string Comment stripped string
*/
- function strip_comments($data)
+ static function strip_comments($data)
{
$output = '';
while (($start = strpos($data, '<!--')) !== false)
@@ -10854,7 +10884,7 @@ class SimplePie_Misc
return $output . $data;
}
- function parse_date($dt)
+ static function parse_date($dt)
{
$parser = SimplePie_Parse_Date::get();
return $parser->parse($dt);
@@ -10868,9 +10898,9 @@ class SimplePie_Misc
* @param string $data Input data
* @return string Output data
*/
- function entities_decode($data)
+ static function entities_decode($data)
{
- $decoder =& new SimplePie_Decode_HTML_Entities($data);
+ $decoder = new SimplePie_Decode_HTML_Entities($data);
return $decoder->parse();
}
@@ -10881,7 +10911,7 @@ class SimplePie_Misc
* @param string $data Data to strip comments from
* @return string Comment stripped string
*/
- function uncomment_rfc822($string)
+ static function uncomment_rfc822($string)
{
$string = (string) $string;
$position = 0;
@@ -10935,7 +10965,7 @@ class SimplePie_Misc
return $output;
}
- function parse_mime($mime)
+ static function parse_mime($mime)
{
if (($pos = strpos($mime, ';')) === false)
{
@@ -10947,7 +10977,7 @@ class SimplePie_Misc
}
}
- function htmlspecialchars_decode($string, $quote_style)
+ static function htmlspecialchars_decode($string, $quote_style)
{
if (function_exists('htmlspecialchars_decode'))
{
@@ -10959,7 +10989,7 @@ class SimplePie_Misc
}
}
- function atom_03_construct_type($attribs)
+ static function atom_03_construct_type($attribs)
{
if (isset($attribs['']['mode']) && strtolower(trim($attribs['']['mode']) === 'base64'))
{
@@ -10995,7 +11025,7 @@ class SimplePie_Misc
}
}
- function atom_10_construct_type($attribs)
+ static function atom_10_construct_type($attribs)
{
if (isset($attribs['']['type']))
{
@@ -11017,7 +11047,7 @@ class SimplePie_Misc
return SIMPLEPIE_CONSTRUCT_TEXT;
}
- function atom_10_content_construct_type($attribs)
+ static function atom_10_content_construct_type($attribs)
{
if (isset($attribs['']['type']))
{
@@ -11048,12 +11078,12 @@ class SimplePie_Misc
}
}
- function is_isegment_nz_nc($string)
+ static function is_isegment_nz_nc($string)
{
return (bool) preg_match('/^([A-Za-z0-9\-._~\x{A0}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFEF}\x{10000}-\x{1FFFD}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}\x{40000}-\x{4FFFD}\x{50000}-\x{5FFFD}\x{60000}-\x{6FFFD}\x{70000}-\x{7FFFD}\x{80000}-\x{8FFFD}\x{90000}-\x{9FFFD}\x{A0000}-\x{AFFFD}\x{B0000}-\x{BFFFD}\x{C0000}-\x{CFFFD}\x{D0000}-\x{DFFFD}\x{E1000}-\x{EFFFD}!$&\'()*+,;=@]|(%[0-9ABCDEF]{2}))+$/u', $string);
}
- function space_seperated_tokens($string)
+ static function space_seperated_tokens($string)
{
$space_characters = "\x20\x09\x0A\x0B\x0C\x0D";
$string_length = strlen($string);
@@ -11072,7 +11102,7 @@ class SimplePie_Misc
return $tokens;
}
- function array_unique($array)
+ static function array_unique($array)
{
if (version_compare(PHP_VERSION, '5.2', '>='))
{
@@ -11122,7 +11152,7 @@ class SimplePie_Misc
* @param int $codepoint Unicode codepoint
* @return string UTF-8 character
*/
- function codepoint_to_utf8($codepoint)
+ static function codepoint_to_utf8($codepoint)
{
$codepoint = (int) $codepoint;
if ($codepoint < 0)
@@ -11169,7 +11199,7 @@ class SimplePie_Misc
* relative to the beginning of haystack.
* @return bool If needle is not found, stripos() will return boolean false.
*/
- function stripos($haystack, $needle, $offset = 0)
+ static function stripos($haystack, $needle, $offset = 0)
{
if (function_exists('stripos'))
{
@@ -11206,7 +11236,7 @@ class SimplePie_Misc
* @param string $str The input string.
* @return array
*/
- function parse_str($str)
+ static function parse_str($str)
{
$return = array();
$str = explode('&', $str);
@@ -11234,7 +11264,7 @@ class SimplePie_Misc
* @param string $data XML data
* @return array Possible encodings
*/
- function xml_encoding($data)
+ static function xml_encoding($data)
{
// UTF-32 Big Endian BOM
if (substr($data, 0, 4) === "\x00\x00\xFE\xFF")
@@ -11266,7 +11296,7 @@ class SimplePie_Misc
{
if ($pos = strpos($data, "\x00\x00\x00\x3F\x00\x00\x00\x3E"))
{
- $parser =& new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 20), 'UTF-32BE', 'UTF-8'));
+ $parser = new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 20), 'UTF-32BE', 'UTF-8'));
if ($parser->parse())
{
$encoding[] = $parser->encoding;
@@ -11279,7 +11309,7 @@ class SimplePie_Misc
{
if ($pos = strpos($data, "\x3F\x00\x00\x00\x3E\x00\x00\x00"))
{
- $parser =& new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 20), 'UTF-32LE', 'UTF-8'));
+ $parser = new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 20), 'UTF-32LE', 'UTF-8'));
if ($parser->parse())
{
$encoding[] = $parser->encoding;
@@ -11292,7 +11322,7 @@ class SimplePie_Misc
{
if ($pos = strpos($data, "\x00\x3F\x00\x3E"))
{
- $parser =& new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 10), 'UTF-16BE', 'UTF-8'));
+ $parser = new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 10), 'UTF-16BE', 'UTF-8'));
if ($parser->parse())
{
$encoding[] = $parser->encoding;
@@ -11305,7 +11335,7 @@ class SimplePie_Misc
{
if ($pos = strpos($data, "\x3F\x00\x3E\x00"))
{
- $parser =& new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 10), 'UTF-16LE', 'UTF-8'));
+ $parser = new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 10), 'UTF-16LE', 'UTF-8'));
if ($parser->parse())
{
$encoding[] = $parser->encoding;
@@ -11318,7 +11348,7 @@ class SimplePie_Misc
{
if ($pos = strpos($data, "\x3F\x3E"))
{
- $parser =& new SimplePie_XML_Declaration_Parser(substr($data, 5, $pos - 5));
+ $parser = new SimplePie_XML_Declaration_Parser(substr($data, 5, $pos - 5));
if ($parser->parse())
{
$encoding[] = $parser->encoding;
@@ -11334,7 +11364,7 @@ class SimplePie_Misc
return $encoding;
}
- function output_javascript()
+ static function output_javascript()
{
if (function_exists('ob_gzhandler'))
{
@@ -11688,12 +11718,12 @@ class SimplePie_IRI
* @param string $relative Relative IRI
* @return SimplePie_IRI
*/
- function absolutize($base, $relative)
+ static function absolutize($base, $relative)
{
$relative = (string) $relative;
if ($relative !== '')
{
- $relative =& new SimplePie_IRI($relative);
+ $relative = new SimplePie_IRI($relative);
if ($relative->get_scheme() !== null)
{
$target = $relative;
@@ -11707,7 +11737,7 @@ class SimplePie_IRI
}
else
{
- $target =& new SimplePie_IRI('');
+ $target = new SimplePie_IRI('');
$target->set_scheme($base->get_scheme());
$target->set_userinfo($base->get_userinfo());
$target->set_host($base->get_host());
@@ -11769,12 +11799,8 @@ class SimplePie_IRI
*/
function parse_iri($iri)
{
- preg_match('/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/', $iri, $match);
- for ($i = count($match); $i <= 9; $i++)
- {
- $match[$i] = '';
- }
- return array('scheme' => $match[2], 'authority' => $match[4], 'path' => $match[5], 'query' => $match[7], 'fragment' => $match[9]);
+ preg_match('/^(([^:\/?#]+):)?(\/\/(\/*[^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/', $iri, $match);
+ return array('scheme' => $match[2], 'authority' => $match[4], 'path' => $match[5], 'query' => isset($match[7]) ? $match[7] : '', 'fragment' => isset($match[9]) ? $match[9] : '');
}
/**
@@ -12056,7 +12082,7 @@ class SimplePie_IRI
}
else
{
- $this->host = $this->replace_invalid_with_pct_encoding($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$&\'()*+,;=', SIMPLEPIE_LOWERCASE);
+ $this->host = $this->replace_invalid_with_pct_encoding($host, '\/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$&\'()*+,;=', SIMPLEPIE_LOWERCASE);
$this->valid[__FUNCTION__] = true;
return true;
}
@@ -12340,7 +12366,7 @@ class SimplePie_Net_IPv6
* @access public
* @static
*/
- function removeNetmaskSpec($ip)
+ static function removeNetmaskSpec($ip)
{
if (strpos($ip, '/') !== false)
{
@@ -12368,7 +12394,7 @@ class SimplePie_Net_IPv6
* @param string $ip a valid IPv6-address (hex format)
* @return string the uncompressed IPv6-address (hex format)
*/
- function Uncompress($ip)
+ static function Uncompress($ip)
{
$uip = SimplePie_Net_IPv6::removeNetmaskSpec($ip);
$c1 = -1;
@@ -12454,7 +12480,7 @@ class SimplePie_Net_IPv6
* @param string $ip a valid IPv6-address (hex format)
* @return array [0] contains the IPv6 part, [1] the IPv4 part (hex format)
*/
- function SplitV64($ip)
+ static function SplitV64($ip)
{
$ip = SimplePie_Net_IPv6::Uncompress($ip);
if (strstr($ip, '.'))
@@ -12480,7 +12506,7 @@ class SimplePie_Net_IPv6
* @param string $ip a valid IPv6-address
* @return bool true if $ip is an IPv6 address
*/
- function checkIPv6($ip)
+ static function checkIPv6($ip)
{
$ipPart = SimplePie_Net_IPv6::SplitV64($ip);
$count = 0;
@@ -13054,12 +13080,12 @@ class SimplePie_Parse_Date
*
* @access public
*/
- function get()
+ static function get()
{
static $object;
if (!$object)
{
- $object =& new SimplePie_Parse_Date;
+ $object = new SimplePie_Parse_Date;
}
return $object;
}
@@ -14074,6 +14100,7 @@ class SimplePie_Locator
var $checked_feeds = 0;
var $max_checked_feeds = 10;
var $content_type_sniffer_class = 'SimplePie_Content_Type_Sniffer';
+ var $headers = array();
function SimplePie_Locator(&$file, $timeout = 10, $useragent = null, $file_class = 'SimplePie_File', $max_checked_feeds = 10, $content_type_sniffer_class = 'SimplePie_Content_Type_Sniffer')
{
@@ -14094,7 +14121,7 @@ class SimplePie_Locator
if ($this->file->method & SIMPLEPIE_FILE_SOURCE_REMOTE)
{
- $sniffer =& new $this->content_type_sniffer_class($this->file);
+ $sniffer = new $this->content_type_sniffer_class($this->file);
if ($sniffer->get_type() !== 'text/html')
{
return null;
@@ -14140,7 +14167,7 @@ class SimplePie_Locator
{
if ($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE)
{
- $sniffer =& new $this->content_type_sniffer_class($file);
+ $sniffer = new $this->content_type_sniffer_class($file);
$sniffed = $sniffer->get_type();
if (in_array($sniffed, array('application/x-rss+xml', 'application/rss+xml', 'application/rdf+xml', 'text/rdf', 'application/atom+xml', 'text/xml', 'application/xml')))
{
@@ -14204,7 +14231,7 @@ class SimplePie_Locator
if (!in_array($href, $done) && in_array('feed', $rel) || (in_array('alternate', $rel) && !empty($link['attribs']['type']['data']) && in_array(strtolower(SimplePie_Misc::parse_mime($link['attribs']['type']['data'])), array('application/rss+xml', 'application/atom+xml'))) && !isset($feeds[$href]))
{
$this->checked_feeds++;
- $feed =& new $this->file_class($href, $this->timeout, 5, null, $this->useragent);
+ $feed = new $this->file_class($href, $this->timeout, 5, $this->headers, $this->useragent);
if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed))
{
$feeds[$href] = $feed;
@@ -14276,7 +14303,7 @@ class SimplePie_Locator
if (in_array(strtolower(strrchr($value, '.')), array('.rss', '.rdf', '.atom', '.xml')))
{
$this->checked_feeds++;
- $feed =& new $this->file_class($value, $this->timeout, 5, null, $this->useragent);
+ $feed = new $this->file_class($value, $this->timeout, 5, $this->headers, $this->useragent);
if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed))
{
return $feed;
@@ -14301,7 +14328,7 @@ class SimplePie_Locator
if (preg_match('/(rss|rdf|atom|xml)/i', $value))
{
$this->checked_feeds++;
- $feed =& new $this->file_class($value, $this->timeout, 5, null, $this->useragent);
+ $feed = new $this->file_class($value, $this->timeout, 5, $this->headers, $this->useragent);
if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed))
{
return $feed;
@@ -14375,7 +14402,7 @@ class SimplePie_Parser
if (substr($data, 0, 5) === '<?xml' && strspn(substr($data, 5, 1), "\x09\x0A\x0D\x20") && ($pos = strpos($data, '?>')) !== false)
{
- $declaration =& new SimplePie_XML_Declaration_Parser(substr($data, 5, $pos - 5));
+ $declaration = new SimplePie_XML_Declaration_Parser(substr($data, 5, $pos - 5));
if ($declaration->parse())
{
$data = substr($data, $pos + 2);
@@ -14425,7 +14452,7 @@ class SimplePie_Parser
else
{
libxml_clear_errors();
- $xml =& new XMLReader();
+ $xml = new XMLReader();
$xml->xml($data);
while (@$xml->read())
{
@@ -14665,7 +14692,7 @@ class SimplePie_Sanitize
// Options
var $remove_div = true;
var $image_handler = '';
- var $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style');
+ var $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'font', 'form', 'frame', 'frameset', 'html', 'input', 'marquee', 'meta', 'noscript', 'script', 'style');
var $encode_instead_of_strip = false;
var $strip_attributes = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc');
var $strip_comments = false;
@@ -14754,7 +14781,7 @@ class SimplePie_Sanitize
}
}
- function strip_htmltags($tags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style'))
+ function strip_htmltags($tags = array('base', 'blink', 'body', 'doctype', 'font', 'form', 'frame', 'frameset', 'html', 'input', 'marquee', 'meta', 'noscript', 'script', 'style'))
{
if ($tags)
{
@@ -14911,7 +14938,7 @@ class SimplePie_Sanitize
}
else
{
- $file =& new $this->file_class($img['attribs']['src']['data'], $this->timeout, 5, array('X-FORWARDED-FOR' => $_SERVER['REMOTE_ADDR']), $this->useragent, $this->force_fsockopen);
+ $file = new $this->file_class($img['attribs']['src']['data'], $this->timeout, 5, array('X-FORWARDED-FOR' => $_SERVER['REMOTE_ADDR']), $this->useragent, $this->force_fsockopen);
$headers = $file->headers;
if ($file->success && ($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($file->status_code === 200 || $file->status_code > 206 && $file->status_code < 300)))