X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=simplepie%2Fsimplepie.inc;h=c3ba02b7db9531d63ff49c815baec37827e21798;hb=c43f647049c78b594c90e95d06d12f29f300d5d3;hp=9e4fa301bb8998b150c43dab6dd6f9394d5ae434;hpb=9f7ae0e95f89b964a098eaacdfd89ff25e05c615;p=friendica.git diff --git a/simplepie/simplepie.inc b/simplepie/simplepie.inc index 9e4fa301bb..c3ba02b7db 100644 --- a/simplepie/simplepie.inc +++ b/simplepie/simplepie.inc @@ -735,7 +735,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) @@ -1105,7 +1105,7 @@ class SimplePie { if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Sanitize')) { - $this->sanitize =& new $class; + $this->sanitize = new $class; return true; } return false; @@ -1599,7 +1599,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) @@ -1640,7 +1640,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, null, $this->useragent, $this->force_fsockopen); } } // If the file connection has an error, set SimplePie::error to that and quit @@ -1660,7 +1660,7 @@ 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); if (!$locate->is_feed($file)) { // We need to unset this so that if SimplePie::set_file() has been called that object is untouched @@ -1690,7 +1690,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 @@ -1760,7 +1760,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')) @@ -1971,11 +1971,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))) @@ -2374,7 +2374,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) { @@ -2389,15 +2389,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)) @@ -2431,6 +2431,11 @@ class SimplePie $name = null; $uri = null; $email = null; + $avatar = null; + $name_date = null; + $uri_date = null; + $avatar_date = null; + if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'])) { $name = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); @@ -2443,9 +2448,26 @@ class SimplePie { $email = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } - if ($name !== null || $email !== null || $uri !== null) + if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0]['data'])) { - $authors[] =& new $this->author_class($name, $uri, $email); + $avatar = $this->sanitize($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0])); + } + if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['name-updated'][0]['data'])) + { + $name_date = $author['child']['http://purl.org/macgirvin/dfrn/1.0']['name-updated'][0]['data']; + } + if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['uri-updated'][0]['data'])) + { + $uri_date = $author['child']['http://purl.org/macgirvin/dfrn/1.0']['uri-updated'][0]['data']; + } + if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar-updated'][0]['data'])) + { + $avatar_date = $author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar-updated'][0]['data']; + } + + if ($name !== null || $email !== null || $uri !== null || $avatar !== null || $name_date !== null || $uri_date !== null || $avatar_date !== null ) + { + $authors[] = new $this->author_class($name, $uri, $email, $avatar, $name_date, $uri_date, $avatar_date); } } if ($author = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'author')) @@ -2467,20 +2489,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)) @@ -2528,7 +2550,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) @@ -2550,7 +2572,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); } } @@ -2964,7 +2986,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')) @@ -2972,7 +2994,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')) @@ -2980,7 +3002,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')) @@ -2988,7 +3010,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')) @@ -2996,7 +3018,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]); } } } @@ -3347,7 +3369,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) { @@ -3362,15 +3384,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)) @@ -3431,7 +3453,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) @@ -3453,7 +3475,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); } } @@ -3475,6 +3497,10 @@ class SimplePie_Item $name = null; $uri = null; $email = null; + $avatar = null; + $name_date = null; + $uri_date = null; + $avatar_date = null; if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'])) { $name = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); @@ -3487,9 +3513,26 @@ class SimplePie_Item { $email = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } - if ($name !== null || $email !== null || $uri !== null) + if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0]['data'])) + { + $avatar = $this->sanitize($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0])); + } + if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['name-updated'][0]['data'])) + { + $name_date = $author['child']['http://purl.org/macgirvin/dfrn/1.0']['name-updated'][0]['data']; + } + if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['uri-updated'][0]['data'])) + { + $uri_date = $author['child']['http://purl.org/macgirvin/dfrn/1.0']['uri-updated'][0]['data']; + } + if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar-updated'][0]['data'])) { - $authors[] =& new $this->feed->author_class($name, $uri, $email); + $avatar_date = $author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar-updated'][0]['data']; + } + + if ($name !== null || $email !== null || $uri !== null || $avatar !== null || $name_date !== null || $uri_date !== null || $avatar_date !== null ) + { + $authors[] = new $this->feed->author_class($name, $uri, $email, $avatar, $name_date, $uri_date, $avatar_date); } } if ($author = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'author')) @@ -3511,24 +3554,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)) @@ -3838,7 +3881,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')) @@ -3870,7 +3913,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)) @@ -3900,7 +3943,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) { @@ -3923,7 +3966,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) { @@ -3934,7 +3977,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'])) { @@ -3944,7 +3987,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); } } } @@ -3966,7 +4009,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')) { @@ -3980,7 +4023,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 @@ -4007,7 +4050,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')) @@ -4033,7 +4076,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)) @@ -4222,7 +4265,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')) @@ -4235,7 +4278,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')) @@ -4256,7 +4299,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')) @@ -4269,7 +4312,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)) @@ -4297,7 +4340,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')) @@ -4311,7 +4354,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')) @@ -4333,7 +4376,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')) @@ -4347,7 +4390,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)) @@ -4553,7 +4596,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)) { @@ -4589,7 +4632,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)) { @@ -4625,7 +4668,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'])) @@ -4651,7 +4694,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)) @@ -4680,7 +4723,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'])) { @@ -4694,7 +4737,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 { @@ -4725,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)) { @@ -4755,7 +4798,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)) { @@ -4908,7 +4951,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)) { @@ -4933,7 +4976,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)) { @@ -4965,7 +5008,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)) { @@ -4991,7 +5034,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)) { @@ -5045,7 +5088,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); } } } @@ -5175,7 +5218,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)) { @@ -5211,7 +5254,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)) @@ -5244,7 +5287,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 { @@ -5275,7 +5318,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)) { @@ -5379,7 +5422,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)) { @@ -5411,7 +5454,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)) { @@ -5450,7 +5493,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); } } } @@ -5486,7 +5529,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); } } @@ -5521,7 +5564,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); } } @@ -5556,14 +5599,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'])); @@ -5840,7 +5883,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) { @@ -5855,15 +5898,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)) @@ -5897,6 +5940,11 @@ class SimplePie_Source $name = null; $uri = null; $email = null; + $avatar = null; + $name_date = null; + $uri_date = null; + $avatar_date = null; + if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'])) { $name = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); @@ -5909,9 +5957,26 @@ class SimplePie_Source { $email = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } - if ($name !== null || $email !== null || $uri !== null) + if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0]['data'])) + { + $avatar = $this->sanitize($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0])); + } + if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['name-updated'][0]['data'])) { - $authors[] =& new $this->item->feed->author_class($name, $uri, $email); + $name_date = $author['child']['http://purl.org/macgirvin/dfrn/1.0']['name-updated'][0]['data']; + } + if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['uri-updated'][0]['data'])) + { + $uri_date = $author['child']['http://purl.org/macgirvin/dfrn/1.0']['uri-updated'][0]['data']; + } + if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar-updated'][0]['data'])) + { + $avatar_date = $author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar-updated'][0]['data']; + } + + if ($name !== null || $email !== null || $uri !== null || $avatar !== null || $name_date !== null || $uri_date !== null || $avatar_date !== null ) + { + $authors[] = new $this->item->feed->author_class($name, $uri, $email, $avatar, $name_date, $uri_date, $avatar_date); } } if ($author = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'author')) @@ -5933,20 +5998,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)) @@ -5994,7 +6059,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) @@ -6016,7 +6081,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); } } @@ -6283,13 +6348,21 @@ class SimplePie_Author var $name; var $link; var $email; + var $avatar; + var $name_date; + var $uri_date; + var $avatar_date; // Constructor, used to input the data - function SimplePie_Author($name = null, $link = null, $email = null) + function SimplePie_Author($name = null, $link = null, $email = null, $avatar = null, $name_date = null, $uri_date = null, $avatar_date = null) { $this->name = $name; $this->link = $link; $this->email = $email; + $this->avatar = $avatar; + $this->name_date = $name_date; + $this->uri_date = $uri_date; + $this->avatar_date = $avatar_date; } function __toString() @@ -6333,6 +6406,54 @@ class SimplePie_Author return null; } } + + function get_avatar() + { + if ($this->avatar !== null) + { + return $this->avatar; + } + else + { + return null; + } + } + + function get_name_date() + { + if ($this->name_date !== null) + { + return $this->name_date; + } + else + { + return null; + } + } + function get_uri_date() + { + if ($this->uri_date !== null) + { + return $this->uri_date; + } + else + { + return null; + } + } + function get_avatar_date() + { + if ($this->avatar_date !== null) + { + return $this->avatar_date; + } + else + { + return null; + } + } + + } class SimplePie_Category @@ -6453,7 +6574,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']); } @@ -7651,7 +7772,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']); } @@ -7712,7 +7833,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; @@ -7793,7 +7914,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; @@ -7812,7 +7933,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'; @@ -8624,7 +8745,7 @@ class SimplePie_Cache */ function create($location, $filename, $extension) { - $location_iri =& new SimplePie_IRI($location); + $location_iri = new SimplePie_IRI($location); switch ($location_iri->get_scheme()) { case 'mysql': @@ -9105,6 +9226,7 @@ class SimplePie_Misc function absolutize_url($relative, $base) { +return $relative; $iri = SimplePie_IRI::absolutize(new SimplePie_IRI($base), $relative); return $iri->get_iri(); } @@ -9338,7 +9460,7 @@ class SimplePie_Misc 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(), @@ -9350,7 +9472,7 @@ class SimplePie_Misc 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); @@ -9361,7 +9483,7 @@ class SimplePie_Misc function normalize_url($url) { - $iri =& new SimplePie_IRI($url); + $iri = new SimplePie_IRI($url); return $iri->get_iri(); } @@ -10881,7 +11003,7 @@ class SimplePie_Misc */ function entities_decode($data) { - $decoder =& new SimplePie_Decode_HTML_Entities($data); + $decoder = new SimplePie_Decode_HTML_Entities($data); return $decoder->parse(); } @@ -11277,7 +11399,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; @@ -11290,7 +11412,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; @@ -11303,7 +11425,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; @@ -11316,7 +11438,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; @@ -11329,7 +11451,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; @@ -11704,7 +11826,7 @@ class SimplePie_IRI $relative = (string) $relative; if ($relative !== '') { - $relative =& new SimplePie_IRI($relative); + $relative = new SimplePie_IRI($relative); if ($relative->get_scheme() !== null) { $target = $relative; @@ -11718,7 +11840,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()); @@ -13070,7 +13192,7 @@ class SimplePie_Parse_Date static $object; if (!$object) { - $object =& new SimplePie_Parse_Date; + $object = new SimplePie_Parse_Date; } return $object; } @@ -14105,7 +14227,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; @@ -14151,7 +14273,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/rss+xml', 'application/rdf+xml', 'text/rdf', 'application/atom+xml', 'text/xml', 'application/xml'))) { @@ -14215,7 +14337,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, null, $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; @@ -14287,7 +14409,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, null, $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; @@ -14312,7 +14434,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, null, $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; @@ -14386,7 +14508,7 @@ class SimplePie_Parser if (substr($data, 0, 5) === '')) !== 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); @@ -14436,7 +14558,7 @@ class SimplePie_Parser else { libxml_clear_errors(); - $xml =& new XMLReader(); + $xml = new XMLReader(); $xml->xml($data); while (@$xml->read()) { @@ -14922,7 +15044,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)))