aboutsummaryrefslogtreecommitdiffstats
path: root/simplepie/simplepie.inc
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-08-08 21:03:08 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-08-08 21:03:08 -0700
commitd11c1c63c02e88b3c73336741a2240ccc18d3b02 (patch)
treeaf32bf9355c99c578f696aec91f66374acd82208 /simplepie/simplepie.inc
parent0bcd5522315649c8d4652b8bfaa9bec328b9d548 (diff)
downloadvolse-hubzilla-d11c1c63c02e88b3c73336741a2240ccc18d3b02.tar.gz
volse-hubzilla-d11c1c63c02e88b3c73336741a2240ccc18d3b02.tar.bz2
volse-hubzilla-d11c1c63c02e88b3c73336741a2240ccc18d3b02.zip
lots of fixes - most recent photo updates for contacts
Diffstat (limited to 'simplepie/simplepie.inc')
-rw-r--r--simplepie/simplepie.inc105
1 files changed, 97 insertions, 8 deletions
diff --git a/simplepie/simplepie.inc b/simplepie/simplepie.inc
index cd5f46944..185e17bcc 100644
--- a/simplepie/simplepie.inc
+++ b/simplepie/simplepie.inc
@@ -2432,6 +2432,10 @@ class SimplePie
$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);
@@ -2446,11 +2450,24 @@ class SimplePie
}
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]));
+ $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 ($name !== null || $email !== null || $uri !== null || $avatar !== null)
+ if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar-updated'][0]['data']))
{
- $authors[] = new $this->author_class($name, $uri, $email, $avatar);
+ $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'))
@@ -3481,6 +3498,9 @@ class SimplePie_Item
$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);
@@ -3497,10 +3517,22 @@ class SimplePie_Item
{
$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 ($name !== null || $email !== null || $uri !== null || $avatar !== null)
+ 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);
+ $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'))
@@ -5909,6 +5941,10 @@ class SimplePie_Source
$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);
@@ -5921,13 +5957,26 @@ class SimplePie_Source
{
$email = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
+ 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 ($name !== null || $email !== null || $uri !== null || $avatar !== null)
+ 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->item->feed->author_class($name, $uri, $email, $avatar);
+ $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'))
@@ -6300,14 +6349,20 @@ class SimplePie_Author
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, $avatar = 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()
@@ -6364,6 +6419,40 @@ class SimplePie_Author
}
}
+ 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;
+ }
+ }
+
}