diff options
author | zotlabs <mike@macgirvin.com> | 2017-11-26 18:29:24 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-11-26 18:29:24 -0800 |
commit | 0e91810ed6764fbbee54e918711bfb45a1d9fd72 (patch) | |
tree | f6c3d995e438057161ecdd7f0afd479df5a751e6 /include/feedutils.php | |
parent | e1fdac32782de11e443c7398ff3fb9870fa9b2d9 (diff) | |
download | volse-hubzilla-0e91810ed6764fbbee54e918711bfb45a1d9fd72.tar.gz volse-hubzilla-0e91810ed6764fbbee54e918711bfb45a1d9fd72.tar.bz2 volse-hubzilla-0e91810ed6764fbbee54e918711bfb45a1d9fd72.zip |
pubstream comments and a few other bugfixes that were discovered along the way
Diffstat (limited to 'include/feedutils.php')
-rw-r--r-- | include/feedutils.php | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/include/feedutils.php b/include/feedutils.php index 50f76b550..8f2c5d988 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -65,15 +65,34 @@ function get_feed_for($channel, $observer_hash, $params) { if(! $channel) http_status_exit(401); + + // logger('params: ' . print_r($params,true)); + + + $interactive = ((is_array($params) && array_key_exists('interactive',$params)) ? intval($params['interactive']) : 0); + + if($params['pages']) { - if(! perm_is_allowed($channel['channel_id'],$observer_hash,'view_pages')) - http_status_exit(403); - } else { - if(! perm_is_allowed($channel['channel_id'],$observer_hash,'view_stream')) - http_status_exit(403); + if(! perm_is_allowed($channel['channel_id'],$observer_hash,'view_pages')) { + if($interactive) { + return ''; + } + else { + http_status_exit(403); + } + } + } + else { + if(! perm_is_allowed($channel['channel_id'],$observer_hash,'view_stream')) { + if($interactive) { + return ''; + } + else { + http_status_exit(403); + } + } } - // logger('params: ' . print_r($params,true)); $feed_template = get_markup_template('atom_feed.tpl'); |