Skip to content
Snippets Groups Projects
Commit e15e9307 authored by Henri-Damien LAURENT's avatar Henri-Damien LAURENT
Browse files

Merge branch...

Merge branch 'hotline#186851_moissonage_oai_sur_500_notices_moissonnees_il_manque_4_notices' into 'master'

hotline#186851 : fixing exporting all elements in OAI

See merge request !4835
parents 93190916 e42518af
Branches
Tags
1 merge request!4835hotline#186851 : fixing exporting all elements in OAI
Pipeline #26166 passed with stage
in 21 minutes and 5 seconds
- correctif #186851 : Moissonage OAI : Toutes les notices d'un domaine sont maintenant moissonables via OAI.
\ No newline at end of file
......@@ -130,9 +130,7 @@ class Class_WebService_OAI_Request_ListIdentifiers {
: 1;
$this->_notices = Class_Catalogue::getNoticesByPreferences(['id_catalogue' => $this->_catalogue->getId(),
'start_limit' => $page_number==1
? 0
: ($page_number -1) *self::$identifiers_by_page + 1,
'start_limit' => ($page_number -1) *self::$identifiers_by_page,
'nb_notices' => self::$identifiers_by_page]);
if (empty($this->_notices))
return $builder->error(['code' => 'noRecordsMatch']);
......
......@@ -202,14 +202,7 @@ class OAIControllerListIdentifiersWithPaginatorTest
public function setUp() {
parent::setUp();
Class_WebService_OAI_Request_ListIdentifiers::$identifiers_by_page = 3;
$this->fixture(Class_Notice::class,
['id' => 1,
'type_doc' => 1,
'clef_alpha' => 'STARWARS1',
'created_at' => '2001-12-14',
'date_maj' => '2017-10-09 11:42:42',
'titre_principal' => 'Star Wars']);
for($i=5; $i<=8; $i++)
for($i=5; $i<=9; $i++)
$this->fixture(Class_Notice::class,
['id' => $i,
'type_doc' => 1,
......@@ -233,13 +226,13 @@ class OAIControllerListIdentifiersWithPaginatorTest
->answers(8)
->whenCalled('fetchAllByColumn')
->with('select notices.id_notice from notices Where (MATCH(facettes) AGAINST(\'+T1\' IN BOOLEAN MODE)) and type=1 order by alpha_titre LIMIT 0,3')
->answers([1, 2, 3])
->answers([2, 3, 4])
->whenCalled('fetchAllByColumn')
->with('select notices.id_notice from notices Where (MATCH(facettes) AGAINST(\'+T1\' IN BOOLEAN MODE)) and type=1 order by alpha_titre LIMIT 4,3')
->answers([4, 5, 6])
->with('select notices.id_notice from notices Where (MATCH(facettes) AGAINST(\'+T1\' IN BOOLEAN MODE)) and type=1 order by alpha_titre LIMIT 3,3')
->answers([5, 6, 7])
->whenCalled('fetchAllByColumn')
->with('select notices.id_notice from notices Where (MATCH(facettes) AGAINST(\'+T1\' IN BOOLEAN MODE)) and type=1 order by alpha_titre LIMIT 7,3')
->answers([7, 8]);
->with('select notices.id_notice from notices Where (MATCH(facettes) AGAINST(\'+T1\' IN BOOLEAN MODE)) and type=1 order by alpha_titre LIMIT 6,3')
->answers([8, 9]);
}
......
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