Skip to content

Commit

Permalink
Merge pull request #11 from carleton/bugfix/magpie
Browse files Browse the repository at this point in the history
Magpie RSS:
  • Loading branch information
dhuyck committed May 22, 2017
2 parents cee0aa1 + bdf218d commit 82011ce
Showing 1 changed file with 14 additions and 2 deletions.
Expand Up @@ -30,10 +30,12 @@ class Magpie_Feed_Display extends DefaultMinisiteModule
'display_timestamp'=>false,
'show_entries_lacking_description'=>false,
'disable_cache'=>false,
'options' => array(),
);
var $feed_location;
var $is_remote;
var $options;
var $availOptions = ['num_posts','field_title','field_words','future_posts'];
function init( $args = array() )
{
parent::init( $args );
Expand All @@ -47,6 +49,17 @@ function init( $args = array() )
{
$this->feed_location = $this->params['feed_location'];
$this->is_remote = $this->params['is_remote'];
if (!empty($this->params['options']))
{
$entOptions = [];
foreach($this->availOptions as $option){
if (isset($this->params['options'][$option]))
$entOptions[$option] = $this->params['options'][$option];
else
$entOptions[$option] = '';
}
$this->options = $entOptions;
}
}
if(!empty($this->params['display_timestamp']))
{
Expand Down Expand Up @@ -76,8 +89,7 @@ function get_feed_relationship_url()
$url = current($urls);
$cache[$this->parent->cur_page->id()] = $url->get_value('url');
$entOptions = [];
$availOptions = ['num_posts','field_title','field_words','future_posts'];
foreach($availOptions as $option){
foreach($this->availOptions as $option){
$entOptions[$option] = $url->get_value($option);
}
$this->options = $entOptions;
Expand Down

0 comments on commit 82011ce

Please sign in to comment.