]> git.mxchange.org Git - friendica.git/commitdiff
hopefully fix statusnet bug by altering our feed format slightly
authorFriendika <info@friendika.com>
Sat, 13 Aug 2011 04:01:51 +0000 (21:01 -0700)
committerFriendika <info@friendika.com>
Sat, 13 Aug 2011 04:01:51 +0000 (21:01 -0700)
boot.php
include/items.php
view/atom_feed.tpl
view/atom_feed_dfrn.tpl [new file with mode: 0644]

index 0a8a2fd8422d9ea1e2848c6dda8b429e4f2e4250..76b80ce04688cded821ce1320020129651eb2f40 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -7,7 +7,7 @@ require_once('include/text.php');
 require_once("include/pgettext.php");
 
 
-define ( 'FRIENDIKA_VERSION',      '2.2.1069' );
+define ( 'FRIENDIKA_VERSION',      '2.2.1070' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.21'    );
 define ( 'DB_UPDATE_VERSION',      1079      );
 
index be231f34df4b76251a120e66f30a0d48b8b048c7..ec519ad9bf564830285277271b5f67159eaf0c81 100644 (file)
@@ -112,7 +112,7 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0)
 
        $items = $r;
 
-       $feed_template = get_markup_template('atom_feed.tpl');
+       $feed_template = get_markup_template(($dfrn_id) ? 'atom_feed_dfrn.tpl' : 'atom_feed.tpl');
 
        $atom = '';
 
@@ -1038,7 +1038,9 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $secure_fee
        if(count($hubs))
                $hub = implode(',', $hubs);
 
-       $rawtags = $feed->get_feed_tags( SIMPLEPIE_NAMESPACE_ATOM_10, 'author');
+       $rawtags = $feed->get_feed_tags( NAMESPACE_DFRN, 'owner');
+       if(! $rawtags)
+               $rawtags = $feed->get_feed_tags( SIMPLEPIE_NAMESPACE_ATOM_10, 'author');
        if($rawtags) {
                $elems = $rawtags[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10];
                if($elems['name'][0]['attribs'][NAMESPACE_DFRN]['updated']) {
index 3d6bcc5b5acc1a4d77d215fa37cb06a211c5a9a7..c7cc082976459a4931aad2f729a409318154b09f 100644 (file)
 
   <updated>$feed_updated</updated>
 
-  <author>
+  <dfrn:owner>
     <name dfrn:updated="$namdate" >$name</name>
     <uri dfrn:updated="$uridate" >$profile_page</uri>
     <link rel="photo"  type="image/jpeg" dfrn:updated="$picdate" media:width="175" media:height="175" href="$photo" />
     <link rel="avatar" type="image/jpeg" dfrn:updated="$picdate" media:width="175" media:height="175" href="$photo" />
     $birthday
-  </author>
+  </dfrn:owner>
diff --git a/view/atom_feed_dfrn.tpl b/view/atom_feed_dfrn.tpl
new file mode 100644 (file)
index 0000000..3d6bcc5
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<feed xmlns="http://www.w3.org/2005/Atom"
+      xmlns:thr="http://purl.org/syndication/thread/1.0"
+      xmlns:at="http://purl.org/atompub/tombstones/1.0"
+      xmlns:media="http://purl.org/syndication/atommedia"
+      xmlns:dfrn="http://purl.org/macgirvin/dfrn/1.0" 
+      xmlns:as="http://activitystrea.ms/spec/1.0/"
+      xmlns:georss="http://www.georss.org/georss" 
+      xmlns:poco="http://portablecontacts.net/spec/1.0" 
+      xmlns:ostatus="http://ostatus.org/schema/1.0" 
+         xmlns:statusnet="http://status.net/schema/api/1/" > 
+
+  <id>$feed_id</id>
+  <title>$feed_title</title>
+  <generator uri="http://friendika.com" version="$version">Friendika</generator>
+  <link rel="license" href="http://creativecommons.org/licenses/by/3.0/" />
+  $hub
+  $salmon
+
+  <updated>$feed_updated</updated>
+
+  <author>
+    <name dfrn:updated="$namdate" >$name</name>
+    <uri dfrn:updated="$uridate" >$profile_page</uri>
+    <link rel="photo"  type="image/jpeg" dfrn:updated="$picdate" media:width="175" media:height="175" href="$photo" />
+    <link rel="avatar" type="image/jpeg" dfrn:updated="$picdate" media:width="175" media:height="175" href="$photo" />
+    $birthday
+  </author>