Merge pull request #1093 from annando/master
Added an alternate link to the profile in the atom feeds (feature request #925)
This commit is contained in:
commit
f17e6f534f
3 changed files with 8 additions and 0 deletions
|
@ -163,6 +163,11 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0)
|
||||||
|
|
||||||
$salmon = feed_salmonlinks($owner_nick);
|
$salmon = feed_salmonlinks($owner_nick);
|
||||||
|
|
||||||
|
$alternatelink = $owner['url'];
|
||||||
|
|
||||||
|
if(isset($category))
|
||||||
|
$alternatelink .= "/category/".$category;
|
||||||
|
|
||||||
$atom .= replace_macros($feed_template, array(
|
$atom .= replace_macros($feed_template, array(
|
||||||
'$version' => xmlify(FRIENDICA_VERSION),
|
'$version' => xmlify(FRIENDICA_VERSION),
|
||||||
'$feed_id' => xmlify($a->get_baseurl() . '/profile/' . $owner_nick),
|
'$feed_id' => xmlify($a->get_baseurl() . '/profile/' . $owner_nick),
|
||||||
|
@ -170,6 +175,7 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0)
|
||||||
'$feed_updated' => xmlify(datetime_convert('UTC', 'UTC', 'now' , ATOM_TIME)) ,
|
'$feed_updated' => xmlify(datetime_convert('UTC', 'UTC', 'now' , ATOM_TIME)) ,
|
||||||
'$hub' => $hubxml,
|
'$hub' => $hubxml,
|
||||||
'$salmon' => $salmon,
|
'$salmon' => $salmon,
|
||||||
|
'$alternatelink' => xmlify($alternatelink),
|
||||||
'$name' => xmlify($owner['name']),
|
'$name' => xmlify($owner['name']),
|
||||||
'$profile_page' => xmlify($owner['url']),
|
'$profile_page' => xmlify($owner['url']),
|
||||||
'$photo' => xmlify($owner['photo']),
|
'$photo' => xmlify($owner['photo']),
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
<title>{{$feed_title}}</title>
|
<title>{{$feed_title}}</title>
|
||||||
<generator uri="http://friendica.com" version="{{$version}}">Friendica</generator>
|
<generator uri="http://friendica.com" version="{{$version}}">Friendica</generator>
|
||||||
<link rel="license" href="http://creativecommons.org/licenses/by/3.0/" />
|
<link rel="license" href="http://creativecommons.org/licenses/by/3.0/" />
|
||||||
|
<link rel="alternate" type="text/html" href="{{$alternatelink}}" />
|
||||||
{{$hub}}
|
{{$hub}}
|
||||||
{{$salmon}}
|
{{$salmon}}
|
||||||
{{$community}}
|
{{$community}}
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
<title>{{$feed_title}}</title>
|
<title>{{$feed_title}}</title>
|
||||||
<generator uri="http://friendica.com" version="{{$version}}">Friendica</generator>
|
<generator uri="http://friendica.com" version="{{$version}}">Friendica</generator>
|
||||||
<link rel="license" href="http://creativecommons.org/licenses/by/3.0/" />
|
<link rel="license" href="http://creativecommons.org/licenses/by/3.0/" />
|
||||||
|
<link rel="alternate" type="text/html" href="{{$alternatelink}}" />
|
||||||
{{$hub}}
|
{{$hub}}
|
||||||
{{$salmon}}
|
{{$salmon}}
|
||||||
{{$community}}
|
{{$community}}
|
||||||
|
|
Loading…
Reference in a new issue