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