diff --git a/app/Http/Controllers/Oai/RequestController.php b/app/Http/Controllers/Oai/RequestController.php index 418684f..759a980 100644 --- a/app/Http/Controllers/Oai/RequestController.php +++ b/app/Http/Controllers/Oai/RequestController.php @@ -106,7 +106,9 @@ class RequestController extends Controller //$xml = $this->doc->asXML(); return response($xml) //->view('rss', array('rss'=>$this->rss)) ->header('Content-Type', 'application/xml') - ->header('charset', 'utf-8'); + ->header('charset', 'utf-8') + ->header('Access-Control-Allow-Origin', '*') + ->header('Access-Control-Allow-Methods', 'GET'); } private function __handleRequest(array $oaiRequest) diff --git a/app/Library/Xml/DatasetExtension.php b/app/Library/Xml/DatasetExtension.php index c8c3f80..22ca685 100644 --- a/app/Library/Xml/DatasetExtension.php +++ b/app/Library/Xml/DatasetExtension.php @@ -304,7 +304,7 @@ trait DatasetExtension } else { $rows = $select->whereHas('dataset', function ($q) use ($datasetId) { $q->where('id', $datasetId); - })->get(); + })->orderBy('id')->get(); } foreach ($rows as $row) { diff --git a/public/datasetxml2oai-pmh.xslt b/public/datasetxml2oai-pmh.xslt index 61bcf09..34c3573 100644 --- a/public/datasetxml2oai-pmh.xslt +++ b/public/datasetxml2oai-pmh.xslt @@ -398,10 +398,10 @@