Corrected default number of articles in CryptomeBridge.
The bridge was outputting a single entry when parameter n was empty.
This commit is contained in:
parent
a9d6fd3e46
commit
50a96a3f21
1 changed files with 2 additions and 1 deletions
|
@ -18,10 +18,11 @@ class CryptomeBridge extends BridgeAbstract{
|
|||
//$link = 'https://secure.netsolhost.com/cryptome.org/';
|
||||
|
||||
$html = file_get_html($link) or $this->returnError('Could not request Cryptome.', 404);
|
||||
if (isset($param['n'])) { /* number of documents */
|
||||
if (!empty($param['n'])) { /* number of documents */
|
||||
$num = min(max(1, $param['n']+0), $num);
|
||||
}
|
||||
|
||||
|
||||
foreach($html->find('pre') as $element) {
|
||||
for ( $i = 0; $i < $num; ++$i ) {
|
||||
$item = new \Item();
|
||||
|
|
Loading…
Reference in a new issue