Skip to content

Commit

Permalink
Merge branch 'CMR-825' into 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
claussni committed Sep 27, 2019
2 parents 74f709c + 870f830 commit 8b3bc6c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Classes/Controller/GetFileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
*
* 4. DataCite from Kitodo.Publication (this extension)
*
* @author Alexander Bigga <[email protected]>
* @author Ralf Claussnitzer <[email protected]>
* @author Florian Rügamer <[email protected]>
* @author Alexander Bigga <[email protected]>
* @author Ralf Claussnitzer <[email protected]>
* @author Florian Rügamer <[email protected]>
*/

use TYPO3\CMS\Core\Utility\GeneralUtility;
Expand Down Expand Up @@ -144,13 +144,13 @@ public function attachmentAction()

$qid = $piVars['qid'];
$source = explode(':', $qid);
if($source[0] == 'qucosa') {
if ($source[0] == 'qucosa') {

$path = rtrim('http://' . $fedoraHost,"/").'/fedora/objects/'.$piVars['qid'].'/methods/qucosa:SDef/getMETSDissemination?supplement=yes';
$path = rtrim('http://' . $fedoraHost, "/").'/fedora/objects/'.$piVars['qid'].'/methods/qucosa:SDef/getMETSDissemination?supplement=yes';
$metsXml = str_replace('&', '&amp;', file_get_contents($path));
$dataCiteXml = \EWW\Dpf\Helper\DataCiteXml::convertFromMetsXml($metsXml);

} elseif($document = $this->documentRepository->findByUid($piVars['qid'])) {
} elseif ($document = $this->documentRepository->findByUid($piVars['qid'])) {

$metsXml = str_replace('&', '&amp;', $this->buildMetsXml($document));
$dataCiteXml = \EWW\Dpf\Helper\DataCiteXml::convertFromMetsXml($metsXml);
Expand All @@ -173,8 +173,8 @@ public function attachmentAction()

case 'zip':
// FIXME Service locations on Fedora host are hard coded
$metsUrl = rtrim('http://' . $fedoraHost,"/") . '/mets?pid=' . $piVars['qid'];
$path = rtrim('http://' . $fedoraHost,"/") . '/zip?metsurl=' . rawurlencode($metsUrl);
$metsUrl = rtrim('http://' . $fedoraHost, "/") . '/mets?pid=' . $piVars['qid'];
$path = rtrim('http://' . $fedoraHost, "/") . '/zip?xmdpfilter=true&metsurl=' . rawurlencode($metsUrl);
break;

default:
Expand Down

0 comments on commit 8b3bc6c

Please sign in to comment.