1
0
Fork 0
forked from blallo/rss-bridge

[Mangareader] Replace global constant with 'defaultValue'

This commit is contained in:
logmanoriginal 2016-09-03 20:03:06 +02:00
parent 013a4c0428
commit 4c96aab832

View file

@ -1,5 +1,4 @@
<?php <?php
define('MANGAREADER_LIMIT', 10); // The default limit
class MangareaderBridge extends BridgeAbstract{ class MangareaderBridge extends BridgeAbstract{
const MAINTAINER = "logmanoriginal"; const MAINTAINER = "logmanoriginal";
@ -69,7 +68,7 @@ class MangareaderBridge extends BridgeAbstract{
'limit'=>array( 'limit'=>array(
'name'=>'Limit', 'name'=>'Limit',
'type'=>'number', 'type'=>'number',
'exampleValue'=>10, 'defaultValue'=>10,
'title'=>'Number of items to return [-1 returns all]' 'title'=>'Number of items to return [-1 returns all]'
) )
) )
@ -154,7 +153,7 @@ class MangareaderBridge extends BridgeAbstract{
case 'Get manga updates': case 'Get manga updates':
$limit = $this->getInput('limit'); $limit = $this->getInput('limit');
if(empty($limit)){ if(empty($limit)){
$limit = MANGAREADER_LIMIT; $limit = self::PARAMETERS[$this->queriedContext]['limit']['defaultValue'];
} }
$this->request = $xpath->query(".//*[@id='mangaproperties']//*[@class='aname']")->item(0)->nodeValue; $this->request = $xpath->query(".//*[@id='mangaproperties']//*[@class='aname']")->item(0)->nodeValue;