Skip to content

Commit

Permalink
Merge branch 'fixQueryParticipants' into 'main'
Browse files Browse the repository at this point in the history
Fix query participants

See merge request softwares-pkp/plugins_ojs/fullJournalTransfer!60
  • Loading branch information
thiagolepidus committed Sep 12, 2024
2 parents da4e66e + 6f4e496 commit 4b1b87a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
9 changes: 6 additions & 3 deletions FullJournalImportExportPlugin.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,18 +227,21 @@ public function exportJournal($journal, $archivePath, $opts)

libxml_use_internal_errors(true);
$journalXml = $filter->execute($journal);
$xml = $journalXml ? $journalXml->saveXml() : null;

$errors = array_filter(libxml_get_errors(), function ($error) {
return $error->level == LIBXML_ERR_ERROR || $error->level == LIBXML_ERR_FATAL;
});

if (!empty($errors)) {
$this->displayXMLValidationErrors($errors, $xml);
try {
$this->displayXMLValidationErrors($errors, $xml);
} catch (Exception $e) {
echo $e->getMessage() . "\n";
}
return false;
}

$xml = $journalXml->saveXml();

if (empty($xml)) {
return false;
}
Expand Down
3 changes: 3 additions & 0 deletions filter/export/ExtendedArticleNativeXmlFilter.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ private function createQueryParticipantsNode($doc, $deployment, $participantIds)

foreach ($participantIds as $participantId) {
$participant = $userDAO->getById($participantId);
if (!$participant) {
continue;
}
$participantNode = $doc->createElementNS(
$deployment->getNamespace(),
'participant',
Expand Down
4 changes: 2 additions & 2 deletions locale/en_US/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ msgid "plugins.importexport.fullJournal.cliUsage"
msgstr ""
"Usage: {$scriptName} {$pluginName} [command] ...\n"
"Commands:\n"
"import [xmlFileName] [user_name]\n"
"export [xmlFileName] [journal_path]\n"
"import [targzFileName] [user_name]\n"
"export [targzFileName] [journal_path]\n"

msgid "plugins.importexport.fullJournalTransfer.attention"
msgstr "Attention"
Expand Down
4 changes: 2 additions & 2 deletions locale/pt_BR/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ msgid "plugins.importexport.fullJournal.cliUsage"
msgstr ""
"Uso: {$scriptName} {$pluginName} [comando] ...\n"
"Comandos:\n"
"import [xmlFileName] [user_name]\n"
"export [xmlFileName] [journal_path]\n"
"import [targzFileName] [user_name]\n"
"export [targzFileName] [journal_path]\n"

msgid "plugins.importexport.fullJournalTransfer.attention"
msgstr "Atenção"
Expand Down
4 changes: 2 additions & 2 deletions version.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<version>
<application>fullJournalTransfer</application>
<type>plugins.importexport</type>
<release>2.0.14.0</release>
<date>2024-06-21</date>
<release>2.0.15.0</release>
<date>2024-09-12</date>
<class>FullJournalImportExportPlugin</class>
</version>

0 comments on commit 4b1b87a

Please sign in to comment.