make it easier to hook into feed headers in the future
This commit is contained in:
parent
803bff4043
commit
97458b2885
@ -73,19 +73,6 @@ function get_feed_for($channel, $observer_hash, $params) {
|
|||||||
if(! perm_is_allowed($channel['channel_id'],$observer_hash,'view_stream'))
|
if(! perm_is_allowed($channel['channel_id'],$observer_hash,'view_stream'))
|
||||||
http_status_exit(403);
|
http_status_exit(403);
|
||||||
}
|
}
|
||||||
$items = items_fetch(array(
|
|
||||||
'wall' => '1',
|
|
||||||
'datequery' => $params['end'],
|
|
||||||
'datequery2' => $params['begin'],
|
|
||||||
'start' => $params['start'], // FIXME
|
|
||||||
'records' => $params['records'], // FIXME
|
|
||||||
'direction' => $params['direction'], // FIXME
|
|
||||||
'pages' => $params['pages'],
|
|
||||||
'order' => 'post',
|
|
||||||
'top' => $params['top'],
|
|
||||||
'cat' => $params['cat']
|
|
||||||
), $channel, $observer_hash, CLIENT_MODE_NORMAL, App::$module);
|
|
||||||
|
|
||||||
|
|
||||||
$feed_template = get_markup_template('atom_feed.tpl');
|
$feed_template = get_markup_template('atom_feed.tpl');
|
||||||
|
|
||||||
@ -112,8 +99,27 @@ function get_feed_for($channel, $observer_hash, $params) {
|
|||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
$x = [ 'xml' => $atom, 'channel' => $channel, 'observer_hash' => $observer_hash, 'params' => $params ];
|
||||||
|
call_hooks('atom_feed_top',$x);
|
||||||
|
|
||||||
|
$atom = $x['xml'];
|
||||||
|
|
||||||
|
// a much simpler interface
|
||||||
call_hooks('atom_feed', $atom);
|
call_hooks('atom_feed', $atom);
|
||||||
|
|
||||||
|
$items = items_fetch(array(
|
||||||
|
'wall' => '1',
|
||||||
|
'datequery' => $params['end'],
|
||||||
|
'datequery2' => $params['begin'],
|
||||||
|
'start' => $params['start'], // FIXME
|
||||||
|
'records' => $params['records'], // FIXME
|
||||||
|
'direction' => $params['direction'], // FIXME
|
||||||
|
'pages' => $params['pages'],
|
||||||
|
'order' => 'post',
|
||||||
|
'top' => $params['top'],
|
||||||
|
'cat' => $params['cat']
|
||||||
|
), $channel, $observer_hash, CLIENT_MODE_NORMAL, App::$module);
|
||||||
|
|
||||||
if($items) {
|
if($items) {
|
||||||
$type = 'html';
|
$type = 'html';
|
||||||
foreach($items as $item) {
|
foreach($items as $item) {
|
||||||
|
Reference in New Issue
Block a user