diff --git a/filter/export/ExtendedIssueNativeXmlFilter.inc.php b/filter/export/ExtendedIssueNativeXmlFilter.inc.php
index fe72796..05931cb 100644
--- a/filter/export/ExtendedIssueNativeXmlFilter.inc.php
+++ b/filter/export/ExtendedIssueNativeXmlFilter.inc.php
@@ -15,6 +15,7 @@ public function &process(&$issues)
$doc->preserveWhiteSpace = false;
$doc->formatOutput = true;
$deployment = $this->getDeployment();
+ $journal = $deployment->getContext();
if (count($issues) == 1) {
$rootNode = $this->createIssueNode($doc, $issues[0]);
@@ -24,6 +25,14 @@ public function &process(&$issues)
$rootNode->appendChild($this->createIssueNode($doc, $issue));
}
}
+
+ $issueDao = DAORegistry::getDAO('IssueDAO');
+ if ($issueDao->customIssueOrderingExists($journal->getId())) {
+ foreach ($issues as $issue) {
+ $rootNode->appendChild($this->createCustomOrderNode($doc, $issue, $journal));
+ }
+ }
+
$doc->appendChild($rootNode);
$rootNode->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
$rootNode->setAttribute('xsi:schemaLocation', $deployment->getNamespace() . ' ' . $deployment->getSchemaFilename());
@@ -45,12 +54,6 @@ public function createIssueNode($doc, $issue)
$issueNode->setAttribute('access_status', $issue->getAccessStatus());
$issueNode->setAttribute('url_path', $issue->getData('urlPath'));
- $issueDAO = DAORegistry::getDAO('IssueDAO');
- $issueOrder = $issueDAO->getCustomIssueOrder($journal->getId(), $issue->getId());
- if ($issueOrder) {
- $issueNode->setAttribute('order', $issueOrder);
- }
-
$this->createLocalizedNodes($doc, $issueNode, 'description', $issue->getDescription(null));
import('plugins.importexport.native.filter.NativeFilterHelper');
$nativeFilterHelper = new NativeFilterHelper();
@@ -100,4 +103,17 @@ public function addArticles($doc, $issueNode, $issue)
$issueNode->appendChild($clone);
}
}
+
+ public function createCustomOrderNode($doc, $issue, $journal)
+ {
+ $deployment = $this->getDeployment();
+
+ $issueDao = DAORegistry::getDAO('IssueDAO');
+ $order = $issueDao->getCustomIssueOrder($journal->getId(), $issue->getId());
+
+ $customOrderNode = $doc->createElementNS($deployment->getNamespace(), 'custom_order', $order);
+ $customOrderNode->setAttribute('id', $issue->getId());
+
+ return $customOrderNode;
+ }
}
diff --git a/filter/import/NativeXmlExtendedIssueFilter.inc.php b/filter/import/NativeXmlExtendedIssueFilter.inc.php
index 72366a4..b2c7bdf 100644
--- a/filter/import/NativeXmlExtendedIssueFilter.inc.php
+++ b/filter/import/NativeXmlExtendedIssueFilter.inc.php
@@ -39,11 +39,6 @@ public function handleElement($node)
if ($issue->getCurrent()) {
$deployment->setCurrentIssue($issue);
}
-
- if ($seq = $node->getAttribute('order')) {
- $issueDao = DAORegistry::getDAO('IssueDAO');
- $issueDao->moveCustomIssueOrder($journal->getId(), $issue->getId(), $seq);
- }
}
return $issue;
diff --git a/filter/import/NativeXmlJournalFilter.inc.php b/filter/import/NativeXmlJournalFilter.inc.php
index 64f1597..9a5ca27 100644
--- a/filter/import/NativeXmlJournalFilter.inc.php
+++ b/filter/import/NativeXmlJournalFilter.inc.php
@@ -386,8 +386,13 @@ public function parseIssues($node, $journal)
echo __('plugins.importexport.fullJournal.importingIssues') . "\n";
for ($n = $node->firstChild; $n !== null; $n = $n->nextSibling) {
- if (is_a($n, 'DOMElement') && $n->tagName === 'extended_issue') {
- $this->parseIssue($n, $journal);
+ if (is_a($n, 'DOMElement')) {
+ if ($n->tagName === 'extended_issue') {
+ $this->parseIssue($n, $journal);
+ }
+ if ($n->tagName === 'custom_order') {
+ $this->parseIssueOrder($n, $journal);
+ }
}
}
@@ -410,6 +415,17 @@ public function parseIssue($node, $journal)
return $importedObjects;
}
+ public function parseIssueOrder($node, $journal)
+ {
+ $deployment = $this->getDeployment();
+
+ $issueId = $deployment->getIssueDBId($node->getAttribute('id'));
+ $customOrder = $node->textContent;
+
+ $issueDAO = DAORegistry::getDAO('IssueDAO');
+ $issueDAO->moveCustomIssueOrder($journal->getId(), $issueId, $customOrder);
+ }
+
public function parseArticles($node, $journal)
{
$deployment = $this->getDeployment();
diff --git a/fullJournal.xsd b/fullJournal.xsd
index b94259e..41a954f 100644
--- a/fullJournal.xsd
+++ b/fullJournal.xsd
@@ -130,13 +130,17 @@
-
+
+
+
+
+
diff --git a/version.xml b/version.xml
index 8eb309a..06499e2 100644
--- a/version.xml
+++ b/version.xml
@@ -10,7 +10,7 @@
fullJournalTransfer
plugins.importexport
- 2.0.11.3
- 2024-05-09
+ 2.0.11.4
+ 2024-05-10
FullJournalImportExportPlugin