From 6d36d22712e2a78ea76b35b3aa527b961921dcce Mon Sep 17 00:00:00 2001 From: witt Date: Fri, 23 Oct 2020 10:25:59 +0200 Subject: [PATCH] Fixed period in title history and moved issued as new field --- Classes/Lib/Zdb.php | 23 +++++++++++++++++++ .../OldTemplates/Ezb/DisplayDetail.html | 9 +++++--- .../Private/Templates/Ezb/DisplayDetail.html | 9 +++++--- 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/Classes/Lib/Zdb.php b/Classes/Lib/Zdb.php index 9b4c9b6..5f6f497 100755 --- a/Classes/Lib/Zdb.php +++ b/Classes/Lib/Zdb.php @@ -379,8 +379,16 @@ public function getPrecursor($zdbId, $initial = FALSE){ $this->zdbData['name'] = $matches[1][0]; } + //period + preg_match('/\(.*)\<\/rdau:P60128\>/', $request, $matches, PREG_OFFSET_CAPTURE); + + if(!empty($matches[1][0])){ + $this->zdbData['period'] = $matches[1][0]; + } + //get date issued preg_match('/\(.*)\<\/dcterms:issued\>/', $request, $matches, PREG_OFFSET_CAPTURE); + if(!empty($matches[1][0])){ $this->zdbData['date_issued'] = $matches[1][0]; } @@ -407,8 +415,16 @@ public function getPrecursor($zdbId, $initial = FALSE){ $this->precursor[$key]['name'] = $matches[1][0]; } + //period + preg_match('/\(.*)\<\/rdau:P60128\>/', $request, $matches, PREG_OFFSET_CAPTURE); + + if(!empty($matches[1][0])){ + $this->precursor[$key]['period'] = $matches[1][0]; + } + //get date issued preg_match('/\(.*)\<\/dcterms:issued\>/', $request, $matches, PREG_OFFSET_CAPTURE); + if(!empty($matches[1][0])){ $this->precursor[$key]['date_issued'] = $matches[1][0]; } @@ -451,6 +467,13 @@ public function getSuccessor($zdbId){ $this->successor[$key]['name'] = $matches[1][0]; } + //period + preg_match('/\(.*)\<\/rdau:P60128\>/', $request, $matches, PREG_OFFSET_CAPTURE); + + if(!empty($matches[1][0])){ + $this->successor[$key]['period'] = $matches[1][0]; + } + //get date issued preg_match('/\(.*)\<\/dcterms:issued\>/', $request, $matches, PREG_OFFSET_CAPTURE); if(!empty($matches[1][0])){ diff --git a/Resources/Private/OldTemplates/Ezb/DisplayDetail.html b/Resources/Private/OldTemplates/Ezb/DisplayDetail.html index e6f4aa9..6b075df 100755 --- a/Resources/Private/OldTemplates/Ezb/DisplayDetail.html +++ b/Resources/Private/OldTemplates/Ezb/DisplayDetail.html @@ -224,7 +224,8 @@

{journal.title}
  • {row.zdbid}
  • -
  • : {row.date_issued}
  • +
  • : {row.period}
  • +
  • {row.date_issued}
  • {row.name}
@@ -233,7 +234,8 @@

{journal.title}
  • {journal.ZDB_number}
  • -
  • : {journal.title_history.zdbData.date_issued}
  • +
  • : {journal.title_history.zdbData.period}
  • +
  • {journal.title_history.zdbData.date_issued}
  • {journal.title_history.zdbData.name}
@@ -242,7 +244,8 @@

{journal.title}
  • {row.zdbid}
  • -
  • : {row.date_issued}
  • +
  • : {row.period}
  • +
  • {row.date_issued}
  • {row.name}
diff --git a/Resources/Private/Templates/Ezb/DisplayDetail.html b/Resources/Private/Templates/Ezb/DisplayDetail.html index a77fd52..ac6edce 100755 --- a/Resources/Private/Templates/Ezb/DisplayDetail.html +++ b/Resources/Private/Templates/Ezb/DisplayDetail.html @@ -224,7 +224,8 @@

{journal.title}
  • {row.zdbid}
  • -
  • : {row.date_issued}
  • +
  • : {row.period}
  • +
  • {row.date_issued}
  • {row.name}
@@ -233,7 +234,8 @@

{journal.title}
  • {journal.ZDB_number}
  • -
  • : {journal.title_history.zdbData.date_issued}
  • +
  • : {journal.title_history.zdbData.period}
  • +
  • {journal.title_history.zdbData.date_issued}
  • {journal.title_history.zdbData.name}
@@ -242,7 +244,8 @@

{journal.title}
  • {row.zdbid}
  • -
  • : {row.date_issued}
  • +
  • : {row.period}
  • +
  • {row.date_issued}
  • {row.name}