some feed cleanup
This commit is contained in:
parent
5f972e00fe
commit
dd35cad62a
@ -343,14 +343,15 @@ class Display extends \Zotlabs\Web\Controller {
|
|||||||
case 'atom':
|
case 'atom':
|
||||||
|
|
||||||
$atom = replace_macros(get_markup_template('atom_feed.tpl'), array(
|
$atom = replace_macros(get_markup_template('atom_feed.tpl'), array(
|
||||||
'$version' => xmlify(\Zotlabs\Lib\System::get_project_version()),
|
'$version' => xmlify(\Zotlabs\Lib\System::get_project_version()),
|
||||||
'$red' => xmlify(\Zotlabs\Lib\System::get_platform_name()),
|
'$generator' => xmlify(\Zotlabs\Lib\System::get_platform_name()),
|
||||||
'$feed_id' => xmlify(\App::$cmd),
|
'$generator_uri' => 'https://hubzilla.org',
|
||||||
'$feed_title' => xmlify(t('Article')),
|
'$feed_id' => xmlify(\App::$cmd),
|
||||||
'$feed_updated' => xmlify(datetime_convert('UTC', 'UTC', 'now', ATOM_TIME)),
|
'$feed_title' => xmlify(t('Article')),
|
||||||
'$author' => '',
|
'$feed_updated' => xmlify(datetime_convert('UTC', 'UTC', 'now', ATOM_TIME)),
|
||||||
'$owner' => '',
|
'$author' => '',
|
||||||
'$profile_page' => xmlify(z_root() . '/display/' . $target_item['mid']),
|
'$owner' => '',
|
||||||
|
'$profile_page' => xmlify(z_root() . '/display/' . $target_item['mid']),
|
||||||
));
|
));
|
||||||
|
|
||||||
$x = [ 'xml' => $atom, 'channel' => $channel, 'observer_hash' => $observer_hash, 'params' => $params ];
|
$x = [ 'xml' => $atom, 'channel' => $channel, 'observer_hash' => $observer_hash, 'params' => $params ];
|
||||||
|
@ -15,15 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
function get_public_feed($channel, $params) {
|
function get_public_feed($channel, $params) {
|
||||||
|
|
||||||
/* $type = 'xml';
|
|
||||||
$begin = NULL_DATE;
|
|
||||||
$end = '';
|
|
||||||
$start = 0;
|
|
||||||
$records = 40;
|
|
||||||
$direction = 'desc';
|
|
||||||
$pages = 0;
|
|
||||||
*/
|
|
||||||
|
|
||||||
if(! $params)
|
if(! $params)
|
||||||
$params = [];
|
$params = [];
|
||||||
|
|
||||||
@ -106,23 +97,15 @@ function get_feed_for($channel, $observer_hash, $params) {
|
|||||||
$owner = atom_render_author('zot:owner',$channel);
|
$owner = atom_render_author('zot:owner',$channel);
|
||||||
|
|
||||||
$atom .= replace_macros($feed_template, array(
|
$atom .= replace_macros($feed_template, array(
|
||||||
'$version' => xmlify(Zotlabs\Lib\System::get_project_version()),
|
'$version' => xmlify(Zotlabs\Lib\System::get_project_version()),
|
||||||
'$red' => xmlify(Zotlabs\Lib\System::get_platform_name()),
|
'$generator' => xmlify(Zotlabs\Lib\System::get_platform_name()),
|
||||||
'$feed_id' => xmlify($channel['xchan_url']),
|
'$generator_uri' => 'https://hubzilla.org',
|
||||||
'$feed_title' => xmlify($channel['channel_name']),
|
'$feed_id' => xmlify($channel['xchan_url']),
|
||||||
'$feed_updated' => xmlify(datetime_convert('UTC', 'UTC', 'now', ATOM_TIME)),
|
'$feed_title' => xmlify($channel['channel_name']),
|
||||||
'$author' => $feed_author,
|
'$feed_updated' => xmlify(datetime_convert('UTC', 'UTC', 'now', ATOM_TIME)),
|
||||||
'$owner' => $owner,
|
'$author' => $feed_author,
|
||||||
'$name' => xmlify($channel['channel_name']),
|
'$owner' => $owner,
|
||||||
'$profile_page' => xmlify($channel['xchan_url']),
|
'$profile_page' => xmlify($channel['xchan_url']),
|
||||||
'$mimephoto' => xmlify($channel['xchan_photo_mimetype']),
|
|
||||||
'$photo' => xmlify($channel['xchan_photo_l']),
|
|
||||||
'$thumb' => xmlify($channel['xchan_photo_m']),
|
|
||||||
'$picdate' => '',
|
|
||||||
'$uridate' => '',
|
|
||||||
'$namdate' => '',
|
|
||||||
'$birthday' => '',
|
|
||||||
'$community' => '',
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<id>{{$feed_id}}</id>
|
<id>{{$feed_id}}</id>
|
||||||
<title>{{$feed_title}}</title>
|
<title>{{$feed_title}}</title>
|
||||||
<generator uri="http://hubzilla.org" version="{{$version}}">{{$red}}</generator>
|
<generator uri="{{$generator_uri}}" version="{{$version}}">{{$generator}}</generator>
|
||||||
<link rel="license" href="http://creativecommons.org/licenses/by/3.0/" />
|
<link rel="license" href="http://creativecommons.org/licenses/by/3.0/" />
|
||||||
{{if $profile_page}}
|
{{if $profile_page}}
|
||||||
<link rel="alternate" type="text/html" href="{{$profile_page}}" />
|
<link rel="alternate" type="text/html" href="{{$profile_page}}" />
|
||||||
|
Reference in New Issue
Block a user