sorting out visitor sessions

This commit is contained in:
Mike Macgirvin 2010-07-16 06:24:41 -07:00
parent 56a37deb73
commit 059e090b53
8 changed files with 158 additions and 129 deletions

View file

@ -7,6 +7,7 @@ if((x($_SESSION,'authenticated')) && (! ($_POST['auth-params'] == 'login'))) {
unset($_SESSION['authenticated']); unset($_SESSION['authenticated']);
unset($_SESSION['uid']); unset($_SESSION['uid']);
unset($_SESSION['visitor_id']); unset($_SESSION['visitor_id']);
unset($_SESSION['is_visitor']);
unset($_SESSION['administrator']); unset($_SESSION['administrator']);
unset($_SESSION['cid']); unset($_SESSION['cid']);
$_SESSION['sysmsg'] = "Logged out." . EOL; $_SESSION['sysmsg'] = "Logged out." . EOL;
@ -34,6 +35,7 @@ else {
unset($_SESSION['authenticated']); unset($_SESSION['authenticated']);
unset($_SESSION['uid']); unset($_SESSION['uid']);
unset($_SESSION['visitor_id']); unset($_SESSION['visitor_id']);
unset($_SESSION['is_visitor']);
unset($_SESSION['administrator']); unset($_SESSION['administrator']);
unset($_SESSION['cid']); unset($_SESSION['cid']);
$encrypted = hash('whirlpool',trim($_POST['password'])); $encrypted = hash('whirlpool',trim($_POST['password']));

View file

@ -151,6 +151,9 @@ if($argc < 3)
'$name' => xmlify($contact['name']), '$name' => xmlify($contact['name']),
'$profile_page' => xmlify($contact['url']), '$profile_page' => xmlify($contact['url']),
'$thumb' => xmlify($contact['thumb']), '$thumb' => xmlify($contact['thumb']),
'$owner_name' => xmlify($owner['name']),
'$owner_profile_page' => xmlify($owner['url']),
'$owner_thumb' => xmlify($owner['thumb']),
'$item_id' => xmlify("urn:X-dfrn:$baseurl:{$owner['uid']}:{$item['hash']}"), '$item_id' => xmlify("urn:X-dfrn:$baseurl:{$owner['uid']}:{$item['hash']}"),
'$title' => xmlify($contact['name']), '$title' => xmlify($contact['name']),
'$published' => xmlify(datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , 'Y-m-d\TH:i:s\Z')), '$published' => xmlify(datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , 'Y-m-d\TH:i:s\Z')),

View file

@ -32,6 +32,13 @@ function get_atom_elements($item) {
if($rawedited) if($rawedited)
$res['edited'] = $rawcreated[0]['data']; $res['edited'] = $rawcreated[0]['data'];
$rawowner = $item->get_item_tags('http://purl.org/macgirvin/dfrn/1.0", 'owner');
if($rawowner[0]['child']['http://purl.org/macgirvin/dfrn/1.0']['name'][0]['data'])
$res['owner-name'] = rawowner[0]['child']['http://purl.org/macgirvin/dfrn/1.0']['name'][0]['data'];
if($rawowner[0]['child']['http://purl.org/macgirvin/dfrn/1.0']['uri'][0]['data'])
$res['owner-link'] = rawowner[0]['child']['http://purl.org/macgirvin/dfrn/1.0']['uri'][0]['data'];
if($rawowner[0]['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0]['data'])
$res['owner-avatar'] = rawowner[0]['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0]['data'];
return $res; return $res;
@ -45,13 +52,18 @@ function post_remote($arr) {
$arr['remote-name'] = notags(trim($arr['remote-name'])); $arr['remote-name'] = notags(trim($arr['remote-name']));
$arr['remote-link'] = notags(trim($arr['remote-link'])); $arr['remote-link'] = notags(trim($arr['remote-link']));
$arr['remote-avatar'] = notags(trim($arr['remote-avatar'])); $arr['remote-avatar'] = notags(trim($arr['remote-avatar']));
$arr['owner-name'] = notags(trim($arr['owner-name']));
$arr['owner-link'] = notags(trim($arr['owner-link']));
$arr['owner-avatar'] = notags(trim($arr['owner-avatar']));
if(! strlen($arr['remote-avatar'])) if(! strlen($arr['remote-avatar']))
$arr['remote-avatar'] = $a->get_baseurl() . '/images/default-profile-sm.jpg'; $arr['remote-avatar'] = $a->get_baseurl() . '/images/default-profile-sm.jpg';
if(! strlen($arr['owner-avatar']))
$arr['owner-avatar'] = $a->get_baseurl() . '/images/default-profile-sm.jpg';
$arr['created'] = datetime_convert('UTC','UTC',$arr['created'],'Y-m-d H:i:s'); $arr['created'] = datetime_convert('UTC','UTC',$arr['created'],'Y-m-d H:i:s');
$arr['edited'] = datetime_convert('UTC','UTC',$arr['edited'],'Y-m-d H:i:s'); $arr['edited'] = datetime_convert('UTC','UTC',$arr['edited'],'Y-m-d H:i:s');
$arr['title'] = notags(trim($arr['title'])); $arr['title'] = notags(trim($arr['title']));
$arr['body'] = escape_tags(trim($arr['body'])); $arr['body'] = escape_tags(trim($arr['body']));
$arr['last-child'] = intval($arr['last_child']); $arr['last-child'] = intval($arr['last-child']);
$arr['visible'] = 1; $arr['visible'] = 1;
$arr['deleted'] = 0; $arr['deleted'] = 0;

View file

@ -39,7 +39,7 @@ function dfrn_poll_init(&$a) {
} }
} }
$profile = ((strlen($r[0]['nickname'])) ? $r[0]['nickname'] : $r[0]['uid']); $profile = ((strlen($r[0]['nickname'])) ? $r[0]['nickname'] : $r[0]['uid']);
goaway($a->get_baseurl() . "/profile/$profile"); goaway($a->get_baseurl() . "/profile/$profile/visit");
} }
goaway($a->get_baseurl()); goaway($a->get_baseurl());
} }

View file

@ -43,12 +43,6 @@ function profile_load(&$a,$uid,$profile = 0) {
function profile_init(&$a) { function profile_init(&$a) {
if($_SESSION['authenticated']) {
// choose which page to show (could be remote auth)
}
if($a->argc > 1) if($a->argc > 1)
$which = $a->argv[1]; $which = $a->argv[1];
else { else {
@ -57,6 +51,15 @@ function profile_init(&$a) {
return; return;
} }
if(($remote_user) && ($a->argc > 2) && ($a->argv[2] == 'visit'))
$_SESSION['is_visitor'] = 1;
else {
unset($_SESSION['is_visitor']);
unset($_SESSION['visitor_id']);
if(! $_SESSION['uid'])
unset($_SESSION['authenticated']);
}
profile_load($a,$which); profile_load($a,$which);
$a->page['htmlhead'] .= "<meta name=\"dfrn-template\" content=\"" . $a->get_baseurl() . "/profile/%s" . "\" />\r\n"; $a->page['htmlhead'] .= "<meta name=\"dfrn-template\" content=\"" . $a->get_baseurl() . "/profile/%s" . "\" />\r\n";
@ -79,9 +82,9 @@ function item_display(&$a, $item,$template,$comment) {
$o .= replace_macros($template,array( $o .= replace_macros($template,array(
'$id' => $item['item_id'], '$id' => $item['item_id'],
'$profile_url' => $profile_url, '$profile_url' => ((strlen($item['remote-link'])) ? $item['remote-link'] : $profile_url),
'$name' => $item['name'], '$name' => ((strlen($item['remote-name'])) ? $item['remote-name'] : $item['name']),
'$thumb' => $thumb, '$thumb' => ((strlen($item['remote-avatar'])) ? $item['remote-avatar'] : $thumb),
'$body' => bbcode($item['body']), '$body' => bbcode($item['body']),
'$ago' => relative_date($item['created']), '$ago' => relative_date($item['created']),
'$indent' => (($item['parent'] != $item['item_id']) ? 'comment-' : ''), '$indent' => (($item['parent'] != $item['item_id']) ? 'comment-' : ''),
@ -196,7 +199,7 @@ function profile_content(&$a) {
if(count($r)) if(count($r))
$a->set_pager_total($r[0]['total']); $a->set_pager_total($r[0]['total']);
dbg(2);
$r = q("SELECT `item`.*, `item`.`id` AS `item_id`, $r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`name`, `contact`.`photo`, `contact`.`url`,

View file

@ -735,7 +735,7 @@ class SimplePie
function SimplePie($feed_url = null, $cache_location = null, $cache_duration = null) function SimplePie($feed_url = null, $cache_location = null, $cache_duration = null)
{ {
// Other objects, instances created here so we can set options on them // 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 // Set options if they're passed to the constructor
if ($cache_location !== null) if ($cache_location !== null)
@ -1105,7 +1105,7 @@ class SimplePie
{ {
if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Sanitize')) if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Sanitize'))
{ {
$this->sanitize =& new $class; $this->sanitize = new $class;
return true; return true;
} }
return false; return false;
@ -1599,7 +1599,7 @@ class SimplePie
{ {
$headers['if-none-match'] = '"' . $this->data['headers']['etag'] . '"'; $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->success)
{ {
if ($file->status_code === 304) if ($file->status_code === 304)
@ -1640,7 +1640,7 @@ class SimplePie
} }
else 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 // If the file connection has an error, set SimplePie::error to that and quit
@ -1660,7 +1660,7 @@ class SimplePie
if (!$this->force_feed) if (!$this->force_feed)
{ {
// Check if the supplied URL is a feed, if it isn't, look for it. // 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)) if (!$locate->is_feed($file))
{ {
// We need to unset this so that if SimplePie::set_file() has been called that object is untouched // 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; $headers = $file->headers;
$data = $file->body; $data = $file->body;
$sniffer =& new $this->content_type_sniffer_class($file); $sniffer = new $this->content_type_sniffer_class($file);
$sniffed = $sniffer->get_type(); $sniffed = $sniffer->get_type();
} }
else else
@ -1760,7 +1760,7 @@ class SimplePie
if ($utf8_data = SimplePie_Misc::change_encoding($data, $encoding, 'UTF-8')) if ($utf8_data = SimplePie_Misc::change_encoding($data, $encoding, 'UTF-8'))
{ {
// Create new parser // Create new parser
$parser =& new $this->parser_class(); $parser = new $this->parser_class();
// If it's parsed fine // If it's parsed fine
if ($parser->parse($utf8_data, 'UTF-8')) if ($parser->parse($utf8_data, 'UTF-8'))
@ -1971,11 +1971,11 @@ class SimplePie
} }
else 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) 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 (substr($sniffer->get_type(), 0, 6) === 'image/')
{ {
if ($cache->save(array('headers' => $file->headers, 'body' => $file->body))) 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); $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) foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'category') as $category)
{ {
@ -2389,15 +2389,15 @@ class SimplePie
{ {
$scheme = null; $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) 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) 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)) if (!empty($categories))
@ -2450,7 +2450,7 @@ class SimplePie
} }
if ($name !== null || $email !== null || $uri !== null || $avatar !== null) if ($name !== null || $email !== null || $uri !== null || $avatar !== null)
{ {
$authors[] =& new $this->author_class($name, $uri, $email, $avatar); $authors[] = new $this->author_class($name, $uri, $email, $avatar);
} }
} }
if ($author = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'author')) if ($author = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'author'))
@ -2472,20 +2472,20 @@ class SimplePie
} }
if ($name !== null || $email !== null || $url !== null) 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) 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) 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) 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)) if (!empty($authors))
@ -2533,7 +2533,7 @@ class SimplePie
} }
if ($name !== null || $email !== null || $uri !== null) 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) foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'contributor') as $contributor)
@ -2555,7 +2555,7 @@ class SimplePie
} }
if ($name !== null || $email !== null || $url !== null) if ($name !== null || $email !== null || $url !== null)
{ {
$contributors[] =& new $this->author_class($name, $url, $email); $contributors[] = new $this->author_class($name, $url, $email);
} }
} }
@ -2969,7 +2969,7 @@ class SimplePie
$keys = array_keys($items); $keys = array_keys($items);
foreach ($keys as $key) 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')) if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'entry'))
@ -2977,7 +2977,7 @@ class SimplePie
$keys = array_keys($items); $keys = array_keys($items);
foreach ($keys as $key) 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')) if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'item'))
@ -2985,7 +2985,7 @@ class SimplePie
$keys = array_keys($items); $keys = array_keys($items);
foreach ($keys as $key) 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')) if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'item'))
@ -2993,7 +2993,7 @@ class SimplePie
$keys = array_keys($items); $keys = array_keys($items);
foreach ($keys as $key) 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')) if ($items = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'item'))
@ -3001,7 +3001,7 @@ class SimplePie
$keys = array_keys($items); $keys = array_keys($items);
foreach ($keys as $key) foreach ($keys as $key)
{ {
$this->data['items'][] =& new $this->item_class($this, $items[$key]); $this->data['items'][] = new $this->item_class($this, $items[$key]);
} }
} }
} }
@ -3352,7 +3352,7 @@ class SimplePie_Item
{ {
$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); $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) foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'category') as $category)
{ {
@ -3367,15 +3367,15 @@ class SimplePie_Item
{ {
$scheme = null; $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) 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) 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)) if (!empty($categories))
@ -3436,7 +3436,7 @@ class SimplePie_Item
} }
if ($name !== null || $email !== null || $uri !== null) 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) foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'contributor') as $contributor)
@ -3458,7 +3458,7 @@ class SimplePie_Item
} }
if ($name !== null || $email !== null || $url !== null) 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);
} }
} }
@ -3499,7 +3499,7 @@ class SimplePie_Item
} }
if ($name !== null || $email !== null || $uri !== null || $avatar !== null) if ($name !== null || $email !== null || $uri !== null || $avatar !== null)
{ {
$authors[] =& new $this->feed->author_class($name, $uri, $email, $avatar); $authors[] = new $this->feed->author_class($name, $uri, $email, $avatar);
} }
} }
@ -3522,24 +3522,24 @@ class SimplePie_Item
} }
if ($name !== null || $email !== null || $url !== null) 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')) 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) 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) 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) 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)) if (!empty($authors))
@ -3849,7 +3849,7 @@ class SimplePie_Item
{ {
$caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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')) elseif ($captions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'text'))
@ -3881,7 +3881,7 @@ class SimplePie_Item
{ {
$caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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)) if (is_array($captions_parent))
@ -3911,7 +3911,7 @@ class SimplePie_Item
{ {
$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); $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) foreach ((array) $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'category') as $category)
{ {
@ -3934,7 +3934,7 @@ class SimplePie_Item
{ {
$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); $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) foreach ((array) $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'category') as $category)
{ {
@ -3945,7 +3945,7 @@ class SimplePie_Item
{ {
$label = $this->sanitize($category['attribs']['']['text'], SIMPLEPIE_CONSTRUCT_TEXT); $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'])) if (isset($category['child'][SIMPLEPIE_NAMESPACE_ITUNES]['category']))
{ {
@ -3955,7 +3955,7 @@ class SimplePie_Item
{ {
$label = $this->sanitize($subcategory['attribs']['']['text'], SIMPLEPIE_CONSTRUCT_TEXT); $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);
} }
} }
} }
@ -3977,7 +3977,7 @@ class SimplePie_Item
{ {
$copyright_label = $this->sanitize($copyright[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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')) elseif ($copyright = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'copyright'))
{ {
@ -3991,7 +3991,7 @@ class SimplePie_Item
{ {
$copyright_label = $this->sanitize($copyright[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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 // CREDITS
@ -4018,7 +4018,7 @@ class SimplePie_Item
{ {
$credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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')) elseif ($credits = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'credit'))
@ -4044,7 +4044,7 @@ class SimplePie_Item
{ {
$credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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)) if (is_array($credits_parent))
@ -4233,7 +4233,7 @@ class SimplePie_Item
{ {
$rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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')) elseif ($ratings = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'explicit'))
@ -4246,7 +4246,7 @@ class SimplePie_Item
{ {
$rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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')) elseif ($ratings = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'rating'))
@ -4267,7 +4267,7 @@ class SimplePie_Item
{ {
$rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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')) elseif ($ratings = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'explicit'))
@ -4280,7 +4280,7 @@ class SimplePie_Item
{ {
$rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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)) if (is_array($ratings_parent))
@ -4308,7 +4308,7 @@ class SimplePie_Item
{ {
$restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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')) elseif ($restrictions = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'block'))
@ -4322,7 +4322,7 @@ class SimplePie_Item
{ {
$restriction_relationship = 'deny'; $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')) elseif ($restrictions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'restriction'))
@ -4344,7 +4344,7 @@ class SimplePie_Item
{ {
$restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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')) elseif ($restrictions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'block'))
@ -4358,7 +4358,7 @@ class SimplePie_Item
{ {
$restriction_relationship = 'deny'; $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)) if (is_array($restrictions_parent))
@ -4564,7 +4564,7 @@ class SimplePie_Item
{ {
$caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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)) if (is_array($captions))
{ {
@ -4600,7 +4600,7 @@ class SimplePie_Item
{ {
$caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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)) if (is_array($captions))
{ {
@ -4636,7 +4636,7 @@ class SimplePie_Item
{ {
$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); $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'])) if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category']))
@ -4662,7 +4662,7 @@ class SimplePie_Item
{ {
$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); $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)) if (is_array($categories) && is_array($categories_parent))
@ -4691,7 +4691,7 @@ class SimplePie_Item
{ {
$copyright_label = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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'])) elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright']))
{ {
@ -4705,7 +4705,7 @@ class SimplePie_Item
{ {
$copyright_label = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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 else
{ {
@ -4736,7 +4736,7 @@ class SimplePie_Item
{ {
$credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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)) if (is_array($credits))
{ {
@ -4766,7 +4766,7 @@ class SimplePie_Item
{ {
$credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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)) if (is_array($credits))
{ {
@ -4919,7 +4919,7 @@ class SimplePie_Item
{ {
$rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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)) if (is_array($ratings))
{ {
@ -4944,7 +4944,7 @@ class SimplePie_Item
{ {
$rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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)) if (is_array($ratings))
{ {
@ -4976,7 +4976,7 @@ class SimplePie_Item
{ {
$restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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)) if (is_array($restrictions))
{ {
@ -5002,7 +5002,7 @@ class SimplePie_Item
{ {
$restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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)) if (is_array($restrictions))
{ {
@ -5056,7 +5056,7 @@ class SimplePie_Item
$title = $title_parent; $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);
} }
} }
} }
@ -5186,7 +5186,7 @@ class SimplePie_Item
{ {
$caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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)) if (is_array($captions))
{ {
@ -5222,7 +5222,7 @@ class SimplePie_Item
{ {
$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); $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)) if (is_array($categories) && is_array($categories_parent))
@ -5255,7 +5255,7 @@ class SimplePie_Item
{ {
$copyright_label = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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 else
{ {
@ -5286,7 +5286,7 @@ class SimplePie_Item
{ {
$credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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)) if (is_array($credits))
{ {
@ -5390,7 +5390,7 @@ class SimplePie_Item
{ {
$rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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)) if (is_array($ratings))
{ {
@ -5422,7 +5422,7 @@ class SimplePie_Item
{ {
$restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT); $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)) if (is_array($restrictions))
{ {
@ -5461,7 +5461,7 @@ class SimplePie_Item
$title = $title_parent; $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);
} }
} }
} }
@ -5497,7 +5497,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 // 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);
} }
} }
@ -5532,7 +5532,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 // 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);
} }
} }
@ -5567,14 +5567,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 // 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)) 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 // 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'])); $this->data['enclosures'] = array_values(SimplePie_Misc::array_unique($this->data['enclosures']));
@ -5851,7 +5851,7 @@ class SimplePie_Source
{ {
$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); $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) foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'category') as $category)
{ {
@ -5866,15 +5866,15 @@ class SimplePie_Source
{ {
$scheme = null; $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) 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) 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)) if (!empty($categories))
@ -5926,7 +5926,7 @@ class SimplePie_Source
} }
if ($name !== null || $email !== null || $uri !== null || $avatar !== null) if ($name !== null || $email !== null || $uri !== null || $avatar !== null)
{ {
$authors[] =& new $this->item->feed->author_class($name, $uri, $email, $avatar); $authors[] = new $this->item->feed->author_class($name, $uri, $email, $avatar);
} }
} }
@ -5949,20 +5949,20 @@ class SimplePie_Source
} }
if ($name !== null || $email !== null || $url !== null) 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) 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) 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) 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)) if (!empty($authors))
@ -6010,7 +6010,7 @@ class SimplePie_Source
} }
if ($name !== null || $email !== null || $uri !== null) 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) foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'contributor') as $contributor)
@ -6032,7 +6032,7 @@ class SimplePie_Source
} }
if ($name !== null || $email !== null || $url !== null) 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);
} }
} }
@ -6485,7 +6485,7 @@ class SimplePie_Enclosure
$this->width = $width; $this->width = $width;
if (class_exists('idna_convert')) if (class_exists('idna_convert'))
{ {
$idn =& new idna_convert; $idn = new idna_convert;
$parsed = SimplePie_Misc::parse_url($link); $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']); $this->link = SimplePie_Misc::compress_parse_url($parsed['scheme'], $idn->encode($parsed['authority']), $parsed['path'], $parsed['query'], $parsed['fragment']);
} }
@ -7683,7 +7683,7 @@ class SimplePie_File
{ {
if (class_exists('idna_convert')) if (class_exists('idna_convert'))
{ {
$idn =& new idna_convert; $idn = new idna_convert;
$parsed = SimplePie_Misc::parse_url($url); $parsed = SimplePie_Misc::parse_url($url);
$url = SimplePie_Misc::compress_parse_url($parsed['scheme'], $idn->encode($parsed['authority']), $parsed['path'], $parsed['query'], $parsed['fragment']); $url = SimplePie_Misc::compress_parse_url($parsed['scheme'], $idn->encode($parsed['authority']), $parsed['path'], $parsed['query'], $parsed['fragment']);
} }
@ -7744,7 +7744,7 @@ class SimplePie_File
curl_close($fp); curl_close($fp);
$this->headers = explode("\r\n\r\n", $this->headers, $info['redirect_count'] + 1); $this->headers = explode("\r\n\r\n", $this->headers, $info['redirect_count'] + 1);
$this->headers = array_pop($this->headers); $this->headers = array_pop($this->headers);
$parser =& new SimplePie_HTTP_Parser($this->headers); $parser = new SimplePie_HTTP_Parser($this->headers);
if ($parser->parse()) if ($parser->parse())
{ {
$this->headers = $parser->headers; $this->headers = $parser->headers;
@ -7825,7 +7825,7 @@ class SimplePie_File
} }
if (!$info['timed_out']) if (!$info['timed_out'])
{ {
$parser =& new SimplePie_HTTP_Parser($this->headers); $parser = new SimplePie_HTTP_Parser($this->headers);
if ($parser->parse()) if ($parser->parse())
{ {
$this->headers = $parser->headers; $this->headers = $parser->headers;
@ -7844,7 +7844,7 @@ class SimplePie_File
{ {
case 'gzip': case 'gzip':
case 'x-gzip': case 'x-gzip':
$decoder =& new SimplePie_gzdecode($this->body); $decoder = new SimplePie_gzdecode($this->body);
if (!$decoder->parse()) if (!$decoder->parse())
{ {
$this->error = 'Unable to decode HTTP "gzip" stream'; $this->error = 'Unable to decode HTTP "gzip" stream';
@ -8656,7 +8656,7 @@ class SimplePie_Cache
*/ */
function create($location, $filename, $extension) function create($location, $filename, $extension)
{ {
$location_iri =& new SimplePie_IRI($location); $location_iri = new SimplePie_IRI($location);
switch ($location_iri->get_scheme()) switch ($location_iri->get_scheme())
{ {
case 'mysql': case 'mysql':
@ -9370,7 +9370,7 @@ class SimplePie_Misc
function parse_url($url) function parse_url($url)
{ {
$iri =& new SimplePie_IRI($url); $iri = new SimplePie_IRI($url);
return array( return array(
'scheme' => (string) $iri->get_scheme(), 'scheme' => (string) $iri->get_scheme(),
'authority' => (string) $iri->get_authority(), 'authority' => (string) $iri->get_authority(),
@ -9382,7 +9382,7 @@ class SimplePie_Misc
function compress_parse_url($scheme = '', $authority = '', $path = '', $query = '', $fragment = '') function compress_parse_url($scheme = '', $authority = '', $path = '', $query = '', $fragment = '')
{ {
$iri =& new SimplePie_IRI(''); $iri = new SimplePie_IRI('');
$iri->set_scheme($scheme); $iri->set_scheme($scheme);
$iri->set_authority($authority); $iri->set_authority($authority);
$iri->set_path($path); $iri->set_path($path);
@ -9393,7 +9393,7 @@ class SimplePie_Misc
function normalize_url($url) function normalize_url($url)
{ {
$iri =& new SimplePie_IRI($url); $iri = new SimplePie_IRI($url);
return $iri->get_iri(); return $iri->get_iri();
} }
@ -10913,7 +10913,7 @@ class SimplePie_Misc
*/ */
function entities_decode($data) function entities_decode($data)
{ {
$decoder =& new SimplePie_Decode_HTML_Entities($data); $decoder = new SimplePie_Decode_HTML_Entities($data);
return $decoder->parse(); return $decoder->parse();
} }
@ -11309,7 +11309,7 @@ class SimplePie_Misc
{ {
if ($pos = strpos($data, "\x00\x00\x00\x3F\x00\x00\x00\x3E")) 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()) if ($parser->parse())
{ {
$encoding[] = $parser->encoding; $encoding[] = $parser->encoding;
@ -11322,7 +11322,7 @@ class SimplePie_Misc
{ {
if ($pos = strpos($data, "\x3F\x00\x00\x00\x3E\x00\x00\x00")) 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()) if ($parser->parse())
{ {
$encoding[] = $parser->encoding; $encoding[] = $parser->encoding;
@ -11335,7 +11335,7 @@ class SimplePie_Misc
{ {
if ($pos = strpos($data, "\x00\x3F\x00\x3E")) 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()) if ($parser->parse())
{ {
$encoding[] = $parser->encoding; $encoding[] = $parser->encoding;
@ -11348,7 +11348,7 @@ class SimplePie_Misc
{ {
if ($pos = strpos($data, "\x3F\x00\x3E\x00")) 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()) if ($parser->parse())
{ {
$encoding[] = $parser->encoding; $encoding[] = $parser->encoding;
@ -11361,7 +11361,7 @@ class SimplePie_Misc
{ {
if ($pos = strpos($data, "\x3F\x3E")) 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()) if ($parser->parse())
{ {
$encoding[] = $parser->encoding; $encoding[] = $parser->encoding;
@ -11736,7 +11736,7 @@ class SimplePie_IRI
$relative = (string) $relative; $relative = (string) $relative;
if ($relative !== '') if ($relative !== '')
{ {
$relative =& new SimplePie_IRI($relative); $relative = new SimplePie_IRI($relative);
if ($relative->get_scheme() !== null) if ($relative->get_scheme() !== null)
{ {
$target = $relative; $target = $relative;
@ -11750,7 +11750,7 @@ class SimplePie_IRI
} }
else else
{ {
$target =& new SimplePie_IRI(''); $target = new SimplePie_IRI('');
$target->set_scheme($base->get_scheme()); $target->set_scheme($base->get_scheme());
$target->set_userinfo($base->get_userinfo()); $target->set_userinfo($base->get_userinfo());
$target->set_host($base->get_host()); $target->set_host($base->get_host());
@ -13102,7 +13102,7 @@ class SimplePie_Parse_Date
static $object; static $object;
if (!$object) if (!$object)
{ {
$object =& new SimplePie_Parse_Date; $object = new SimplePie_Parse_Date;
} }
return $object; return $object;
} }
@ -14137,7 +14137,7 @@ class SimplePie_Locator
if ($this->file->method & SIMPLEPIE_FILE_SOURCE_REMOTE) 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') if ($sniffer->get_type() !== 'text/html')
{ {
return null; return null;
@ -14183,7 +14183,7 @@ class SimplePie_Locator
{ {
if ($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE) 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(); $sniffed = $sniffer->get_type();
if (in_array($sniffed, array('application/rss+xml', 'application/rdf+xml', 'text/rdf', 'application/atom+xml', 'text/xml', 'application/xml'))) if (in_array($sniffed, array('application/rss+xml', 'application/rdf+xml', 'text/rdf', 'application/atom+xml', 'text/xml', 'application/xml')))
{ {
@ -14247,7 +14247,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])) 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++; $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)) 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; $feeds[$href] = $feed;
@ -14319,7 +14319,7 @@ class SimplePie_Locator
if (in_array(strtolower(strrchr($value, '.')), array('.rss', '.rdf', '.atom', '.xml'))) if (in_array(strtolower(strrchr($value, '.')), array('.rss', '.rdf', '.atom', '.xml')))
{ {
$this->checked_feeds++; $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)) 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; return $feed;
@ -14344,7 +14344,7 @@ class SimplePie_Locator
if (preg_match('/(rss|rdf|atom|xml)/i', $value)) if (preg_match('/(rss|rdf|atom|xml)/i', $value))
{ {
$this->checked_feeds++; $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)) 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; return $feed;
@ -14418,7 +14418,7 @@ class SimplePie_Parser
if (substr($data, 0, 5) === '<?xml' && strspn(substr($data, 5, 1), "\x09\x0A\x0D\x20") && ($pos = strpos($data, '?>')) !== false) 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()) if ($declaration->parse())
{ {
$data = substr($data, $pos + 2); $data = substr($data, $pos + 2);
@ -14468,7 +14468,7 @@ class SimplePie_Parser
else else
{ {
libxml_clear_errors(); libxml_clear_errors();
$xml =& new XMLReader(); $xml = new XMLReader();
$xml->xml($data); $xml->xml($data);
while (@$xml->read()) while (@$xml->read())
{ {
@ -14954,7 +14954,7 @@ class SimplePie_Sanitize
} }
else 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; $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))) if ($file->success && ($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($file->status_code === 200 || $file->status_code > 206 && $file->status_code < 300)))

View file

@ -8,3 +8,7 @@ alter table `item` insert `remote-id` char( 255 ) character set utf-8 collate ut
ALTER TABLE `item` ADD `remote-name` CHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `remote-id` , ALTER TABLE `item` ADD `remote-name` CHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `remote-id` ,
ADD `remote-link` CHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `remote-name` , ADD `remote-link` CHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `remote-name` ,
ADD `remote-avatar` CHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `remote-link` ; ADD `remote-avatar` CHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `remote-link` ;
ALTER TABLE `item` ADD `owner-name` CHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `contact-id` ,
ADD `owner-link` CHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `owner-name` ,
ADD `owner-avatar` CHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `owner-link` ;

View file

@ -4,6 +4,11 @@
<uri>$profile_page</uri> <uri>$profile_page</uri>
<dfrn:avatar>$thumb</dfrn:avatar> <dfrn:avatar>$thumb</dfrn:avatar>
</author> </author>
<dfrn:owner>
<dfrn:name>$owner_name</dfrn:name>
<dfrn:uri>$owner_profile_page</dfrn:uri>
<dfrn:avatar>$owner_thumb</dfrn:avatar>
</dfrn:owner>
<id>$item_id</id> <id>$item_id</id>
<title>$title</title> <title>$title</title>