Commit 577231b5 authored by Patrick Barroca's avatar Patrick Barroca 😠
Browse files

api compatibility

parent 26affcdd
......@@ -163,7 +163,7 @@ class Admin_HarvestController extends ZendAfi_Controller_Action {
return;
$service = new Class_WebService_BibNumerique_Orphea();
$response = $service->harvestPage($this->_getParam('unid'),
$response = $service->harvestOrpheaPage($this->_getParam('unid'),
$this->_getParam('page', 1), $this->_getParam('total_count'));
echo json_encode($response);
}
......
......@@ -56,7 +56,7 @@ class Class_WebService_BibNumerique_Orphea extends Class_WebService_BibNumerique
protected function loadPage($page_number = 1) {
$this->harvestPage('', $page_number, '' );
$this->harvestOrpheaPage('', $page_number, '');
return $this;
}
......@@ -81,7 +81,12 @@ class Class_WebService_BibNumerique_Orphea extends Class_WebService_BibNumerique
}
public function harvestPage($unid, $page = 1, $total_records = '') {
public function harvestPage($page_number=1) {
return $this->harvestOrpheaPage('', $page_number, '');
}
public function harvestOrpheaPage($unid, $page = 1, $total_records = '') {
if (!$this->getUNID($unid)) {
return ['error' => $this->unid_parser->getFullMessage()];
}
......
Markdown is supported
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