Skip to content
Snippets Groups Projects
Commit 07c4ec8c authored by Sebastien ANDRE's avatar Sebastien ANDRE
Browse files

Merge branch...

Merge branch 'hotline#190269_moissonnage_oai_de_la_mel_ne_remonte_plus_que_100_notices' into 'master'

hotline : #190269 : with storm_query let storm manage offset

See merge request !4868
parents 322593d3 965a3f06
1 merge request!4868hotline : #190269 : with storm_query let storm manage offset
Pipeline #27836 passed with stage
in 19 minutes and 44 seconds
- correctif #190269 : OAI : Correctif toutes les pages du dépot OAI sont à nouveau moissonables.
\ No newline at end of file
......@@ -134,7 +134,7 @@ class Class_WebService_OAI_Request_ListIdentifiers extends Class_WebService_OAI_
: 1;
$this->_notices = Class_Catalogue::getNoticesByPreferences(['id_catalogue' => $this->_catalogue->getId(),
'start_limit' => ($page_number -1) *self::$identifiers_by_page,
'start_limit' => $page_number,
'nb_notices' => self::$identifiers_by_page]);
if (empty($this->_notices))
return $this->error('noRecordsMatch', '');
......
......@@ -189,6 +189,9 @@ class OAIControllerListIdentifiersValidTest
class OAIControllerListIdentifiersWithPaginatorTest
extends OAIControllerListIdentifiersTestCase {
protected bool $_storm_mock_zend_adapter = true;
protected array $_storm_scopes = [Class_WebService_OAI_Request_ListIdentifiers::class];
public function setUp() {
parent::setUp();
......@@ -219,6 +222,7 @@ class OAIControllerListIdentifiersWithPaginatorTest
$this->_xpath->assertXPathContentContains($this->_response->getBody(),
'//oai:resumptionToken[@completeListSize="8"][@cursor="0"]',
'oai_dc!zork!!!2');
$this->assertSql("SELECT `notices`.`id_notice` FROM `notices` WHERE (MATCH(`notices`.`titres`, `notices`.`auteurs`, `notices`.`editeur`, `notices`.`collection`, `notices`.`matieres`, `notices`.`dewey`, `notices`.`other_terms`, `notices`.`facets`) AGAINST('+F_T1' IN BOOLEAN MODE) AND `notices`.`type` = 1) ORDER BY `notices`.`alpha_titre` ASC LIMIT 3");
}
......@@ -228,6 +232,7 @@ class OAIControllerListIdentifiersWithPaginatorTest
$this->_xpath->assertXPathContentContains($this->_response->getBody(),
'//oai:resumptionToken[@completeListSize="8"][@cursor="3"]',
'oai_dc!zork!!!3');
$this->assertSql("SELECT `notices`.`id_notice` FROM `notices` WHERE (MATCH(`notices`.`titres`, `notices`.`auteurs`, `notices`.`editeur`, `notices`.`collection`, `notices`.`matieres`, `notices`.`dewey`, `notices`.`other_terms`, `notices`.`facets`) AGAINST('+F_T1' IN BOOLEAN MODE) AND `notices`.`type` = 1) ORDER BY `notices`.`alpha_titre` ASC LIMIT 3 OFFSET 3");
}
......@@ -236,6 +241,7 @@ class OAIControllerListIdentifiersWithPaginatorTest
$this->dispatch('/opac/oai/request?verb=ListIdentifiers&resumptionToken=oai_dc!zork!!!3');
$this->_xpath->assertNotXPath($this->_response->getBody(),
'//oai:resumptionToken');
$this->assertSql("SELECT `notices`.`id_notice` FROM `notices` WHERE (MATCH(`notices`.`titres`, `notices`.`auteurs`, `notices`.`editeur`, `notices`.`collection`, `notices`.`matieres`, `notices`.`dewey`, `notices`.`other_terms`, `notices`.`facets`) AGAINST('+F_T1' IN BOOLEAN MODE) AND `notices`.`type` = 1) ORDER BY `notices`.`alpha_titre` ASC LIMIT 3 OFFSET 6");
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment