Skip to content

Commit 0d32902

Browse files
Merge branch 'fixGalleyFormValidation' into 'main'
Corrige erro na validação do formulário da composição final See merge request softwares-pkp/plugins_ojs/doiscielo!34
2 parents e6a7012 + e659fe5 commit 0d32902

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

classes/dispatchers/FormsEditDispatcher.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,22 @@ public function modifyGalleyFormValidation($hookName, $params)
9292
{
9393
$form = &$params[0];
9494
$submission = $form->_submission;
95+
$publication = $form->_publication;
9596

9697
if (!empty($submission->getData('submissionProgress')) || !empty($form->_preprintGalley)) {
9798
return Hook::CONTINUE;
9899
}
99100

100-
$checker = new ScreeningChecker();
101-
$galleys = $submission->getGalleys();
101+
$galleys = Repo::galley()
102+
->getCollector()
103+
->filterByPublicationIds([$publication->getId()])
104+
->getMany()
105+
->toArray();
102106
$galleysFiletypes = array_map(function ($galley) {
103107
return ($galley->getFileType());
104108
}, $galleys);
105109

110+
$checker = new ScreeningChecker();
106111
if ($checker->checkNumberPdfs($galleysFiletypes)[0]) {
107112
$form->addErrorField('preprintGalleyFormNotification');
108113
$form->addError('preprintGalleyFormNotification', __("plugins.generic.scieloScreening.screeningRules.numPdfs"));

version.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<version>
99
<application>scieloScreening</application>
1010
<type>plugins.generic</type>
11-
<release>2.1.6.0</release>
12-
<date>2025-11-19</date>
11+
<release>2.1.6.1</release>
12+
<date>2025-11-24</date>
1313
<lazy-load>1</lazy-load>
1414
<class>ScieloScreeningPlugin</class>
1515
</version>

0 commit comments

Comments
 (0)