Skip to content

Commit

Permalink
pkp/pkp-lib#10292 Controlled vocab dao to eloquent model
Browse files Browse the repository at this point in the history
  • Loading branch information
touhidurabir committed Aug 20, 2024
1 parent 45373b2 commit e78a892
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
17 changes: 8 additions & 9 deletions classes/ArticleFront.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@

namespace APP\plugins\generic\jatsTemplate\classes;

use APP\core\Application;
use APP\facades\Repo;
use APP\issue\Issue;
use APP\facades\Repo;
use PKP\core\PKPString;
use APP\journal\Journal;
use APP\section\Section;
use APP\submission\Submission;
use APP\publication\Publication;
use PKP\core\PKPRequest;
use APP\core\Application;
use PKP\core\PKPApplication;
use PKP\core\PKPString;
use PKP\db\DAORegistry;
use APP\submission\Submission;
use PKP\plugins\PluginRegistry;
use APP\publication\Publication;
use PKP\submissionFile\SubmissionFile;
use PKP\core\PKPRequest;
use PKP\submission\SubmissionKeywordVocab;

class ArticleFront extends \DOMDocument
{
Expand Down Expand Up @@ -284,8 +284,7 @@ function createArticleMeta(Submission $submission, Journal $journal, Section $se
->appendChild($this->createElement('self-uri'))
->setAttribute('xlink:href', $url);

$submissionKeywordDao = DAORegistry::getDAO('SubmissionKeywordDAO');
foreach ($submissionKeywordDao->getKeywords($publication->getId(), $journal->getSupportedSubmissionLocales()) as $locale => $keywords) {
foreach (SubmissionKeywordVocab::getKeywords($publication->getId(), $journal->getSupportedSubmissionLocales()) as $locale => $keywords) {
if (empty($keywords)) continue;

$kwdGroupElement = $articleMetaElement
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/ArticleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ArticleTest extends PKPTestCase
*/
protected function getMockedDAOs(): array
{
return [...parent::getMockedDAOs(), 'OAIDAO', 'SubmissionSubjectDAO', 'SubmissionKeywordDAO'];
return [...parent::getMockedDAOs(), 'OAIDAO'];
}

/**
Expand Down

0 comments on commit e78a892

Please sign in to comment.