1
0
Fork 0
forked from blallo/rss-bridge

[PinterestBridge] Fix checkbox not working

Changed behaviour of the checkbox to use the custom parser when
active. That way if the parameter is missing the default value
applies and the feed returns from the provided RSS

Reported via #498
This commit is contained in:
logmanoriginal 2017-04-10 14:34:42 +02:00
parent a9535797e6
commit 638d173b70

View file

@ -17,10 +17,9 @@ class PinterestBridge extends FeedExpander {
'required' => true 'required' => true
), ),
'r' => array( 'r' => array(
'name' => 'Use provided RSS', 'name' => 'Use custom RSS',
'type' => 'checkbox', 'type' => 'checkbox',
'required' => false, 'required' => false,
'defaultValue' => 'checked',
'title' => 'Uncheck to return data via custom filters (more data)' 'title' => 'Uncheck to return data via custom filters (more data)'
) )
), ),
@ -36,10 +35,10 @@ class PinterestBridge extends FeedExpander {
switch($this->queriedContext){ switch($this->queriedContext){
case 'By username and board': case 'By username and board':
if($this->getInput('r')){ if($this->getInput('r')){
$this->collectExpandableDatas($this->getURI() . '.rss');
} else {
$html = getSimpleHTMLDOMCached($this->getURI()); $html = getSimpleHTMLDOMCached($this->getURI());
$this->getUserResults($html); $this->getUserResults($html);
} else {
$this->collectExpandableDatas($this->getURI() . '.rss');
} }
break; break;
case 'From search': case 'From search':