From c2f37ab34a3c5465f3cf9f72daba131b1dc723e6 Mon Sep 17 00:00:00 2001 From: Touhidur Rahman Date: Tue, 20 Aug 2024 16:01:12 +0600 Subject: [PATCH 1/3] pkp/pkp-lib#10292 Controlled vocab dao to eloquent model --- CitationStyleLanguagePlugin.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CitationStyleLanguagePlugin.php b/CitationStyleLanguagePlugin.php index 21a4f7c..e91d36f 100644 --- a/CitationStyleLanguagePlugin.php +++ b/CitationStyleLanguagePlugin.php @@ -40,8 +40,7 @@ use PKP\linkAction\request\AjaxModal; use PKP\plugins\GenericPlugin; use PKP\plugins\Hook; -use PKP\submission\SubmissionKeywordDAO; -use PKP\submission\SubmissionLanguageDAO; +use PKP\submission\SubmissionKeywordVocab; use Seboettg\CiteProc\CiteProc; use stdClass; @@ -417,10 +416,8 @@ public function getCitation(PKPRequest $request, Submission $submission, string $chapter = $this->application === 'omp' ? $this->getChapter($request, $publication) : null; } $this->setDocumentType($chapter); - /** @var SubmissionKeywordDAO $submissionKeywordDao */ - $submissionKeywordDao = DAORegistry::getDAO('SubmissionKeywordDAO'); - $keywords = $submissionKeywordDao->getKeywords($publication->getId(), [Locale::getSupportedLocales()]); + $keywords = SubmissionKeywordVocab::getKeywords($publication->getId(), [Locale::getSupportedLocales()]); $citationData = new stdClass(); if ($this->isArticle) { From cf107128e369daacd5f9c93da12f8d2fb28f9c97 Mon Sep 17 00:00:00 2001 From: Touhidur Rahman Date: Mon, 26 Aug 2024 19:05:51 +0600 Subject: [PATCH 2/3] pkp/pkp-lib#10292 removed extended vocab classes --- CitationStyleLanguagePlugin.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CitationStyleLanguagePlugin.php b/CitationStyleLanguagePlugin.php index e91d36f..f334196 100644 --- a/CitationStyleLanguagePlugin.php +++ b/CitationStyleLanguagePlugin.php @@ -30,6 +30,7 @@ use APP\submission\Submission; use APP\template\TemplateManager; use Exception; +use PKP\controlledVocab\ControlledVocab; use PKP\core\JSONMessage; use PKP\core\PKPApplication; use PKP\core\PKPRequest; @@ -40,7 +41,6 @@ use PKP\linkAction\request\AjaxModal; use PKP\plugins\GenericPlugin; use PKP\plugins\Hook; -use PKP\submission\SubmissionKeywordVocab; use Seboettg\CiteProc\CiteProc; use stdClass; @@ -417,7 +417,13 @@ public function getCitation(PKPRequest $request, Submission $submission, string } $this->setDocumentType($chapter); - $keywords = SubmissionKeywordVocab::getKeywords($publication->getId(), [Locale::getSupportedLocales()]); + $keywords = Repo::controlledVocab()->getBySymbolic( + ControlledVocab::CONTROLLED_VOCAB_SUBMISSION_KEYWORD, + Application::ASSOC_TYPE_PUBLICATION, + $publication->getId(), + [Locale::getSupportedLocales()] + ); + $citationData = new stdClass(); if ($this->isArticle) { From 97c5752329e4c5b7b01915b66e6e00c234eddab7 Mon Sep 17 00:00:00 2001 From: Touhidur Rahman Date: Mon, 7 Oct 2024 16:28:42 +0600 Subject: [PATCH 3/3] pkp/pkp-lib#10292 fixed context locale retrieve --- CitationStyleLanguagePlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CitationStyleLanguagePlugin.php b/CitationStyleLanguagePlugin.php index f334196..c1a5d53 100644 --- a/CitationStyleLanguagePlugin.php +++ b/CitationStyleLanguagePlugin.php @@ -421,7 +421,7 @@ public function getCitation(PKPRequest $request, Submission $submission, string ControlledVocab::CONTROLLED_VOCAB_SUBMISSION_KEYWORD, Application::ASSOC_TYPE_PUBLICATION, $publication->getId(), - [Locale::getSupportedLocales()] + $context->getSupportedLocales() ); $citationData = new stdClass();