diff --git a/DNBExportPlugin.inc.php b/DNBExportPlugin.inc.php
index 9e5c69b..321aa44 100644
--- a/DNBExportPlugin.inc.php
+++ b/DNBExportPlugin.inc.php
@@ -22,7 +22,7 @@
define('DNB_STATUS_DEPOSITED', 'deposited');
# determines whether to export remote galleys (experimental feature)
define('EXPORT_REMOTE_GALLEYS', false);
-define('ALLOWED_REMOTE_IP_PATTERN','/160.45./');//@RS implement IP pattern as setting
+define('ALLOWED_REMOTE_IP_PATTERN','/160.45./');//TODO @RS implement IP pattern as setting
define('ADDITIONAL_PACKAGE_OPTIONS','');//use --format=gnu with tar to avoid PAX-Headers
if (!DEBUG) {
@@ -66,15 +66,17 @@ function getDescription() {
* @copydoc ImportExportPlugin::display()
*/
function display($args, $request) {
-
- if (($args[0] == 'exportSubmissions') & empty((array) $request->getUserVar('selectedSubmissions'))) {
- //show error
- $this->errorNotification($request, array(array('plugins.importexport.dnb.deposit.error.noObjectsSelected')));
- // redirect back to exportSubmissions-tab
- $path = array('plugin', $this->getName());
- $request->redirect(null, null, null, $path, null, 'exportSubmissions-tab');
- return;
- }
+
+ if (!empty($args)) {
+ if (($args[0] == 'exportSubmissions') & empty((array) $request->getUserVar('selectedSubmissions'))) {
+ //show error
+ $this->errorNotification($request, array(array('plugins.importexport.dnb.deposit.error.noObjectsSelected')));
+ // redirect back to exportSubmissions-tab
+ $path = array('plugin', $this->getName());
+ $request->redirect(null, null, null, $path, null, 'exportSubmissions-tab');
+ return;
+ }
+ }
parent::display($args, $request);
diff --git a/README b/README
index 82bea1f..c673216 100644
--- a/README
+++ b/README
@@ -1,12 +1,10 @@
=============================================================
=== OJS DNB Export Plugin
-=== Version: 1.3.1.1
+=== Version: 1.3.2
=== Author: Bozana Bokan, Ronald Steffen
-=== Last update: September 14, 2020
+=== Last update: January 15, 2021
=============================================================
-Attention: Please do not use automatic deposit until next official release.
-
About
-----
This plugin provides the export of article metadata and full texts (in PDF and EPUB format) for their transfer to the German National Library (DNB)
diff --git a/README_DE b/README_DE
index 6c40d27..eb8872a 100644
--- a/README_DE
+++ b/README_DE
@@ -1,13 +1,11 @@
=============================================================
=== OJS DNB-Export-Plug-In
-=== Version: 1.3.1.1
+=== Version: 1.3.2
=== Autor: Bozana Bokan, Ronald Steffen
-=== Letzte Ãnderung: 14. September 2020
+=== Letzte Änderung: 15. Januar 2021
=============================================================
-Achtung: Bitte benutzen Sie bis zur Veröffentlichung einer neuen Plugin-Version nicht die automatische Ablieferung an die DNB.
-
-Über
+Ãœber
-----
Dieses Plug-In ermöglicht den Export von Artikel-Metadaten und -Volltexten (im PDF- und EPUB-Format) zwecks ihrer Pflichtablieferung an die Deutsche Nationalbibliothek (DNB)
mittels DNB-Hotfolder-Verfahren. Das Plug-In bietet auch die Option, das Transferpaket direkt in den DNB-Hotfolder abzuliefern.
@@ -21,7 +19,7 @@ Das Plug-In ist unter GNU General Public License v2 lizenziert. Sehen Sie die Da
Systemanforderungen
-------------------
Dieses Plug-In ist kompatibel mit...
- - OJS 3.1.1
+ - OJS 3.1.1, 3.1.2
TAR-Programm wird benötigt und es muss in der Datei config.inc.php konfiguriert werden.
diff --git a/filter/DNBXmlFilter.inc.php b/filter/DNBXmlFilter.inc.php
index e550830..9309b7a 100644
--- a/filter/DNBXmlFilter.inc.php
+++ b/filter/DNBXmlFilter.inc.php
@@ -17,6 +17,7 @@
import('lib.pkp.plugins.importexport.native.filter.NativeExportFilter');
define('XML_NON_VALID_CHARCTERS', 100);
define('URN_SET', 101);
+define('MESSAGE_URN_SET','An URN has been set.'); // @RS refine
class DNBXmlFilter extends NativeExportFilter {
/**
@@ -79,7 +80,7 @@ function &process(&$pubObject) {
}
// abort export in case any URN is set, this is a special case that has to be discussed with DNB and implmented differently in each case
- $articleURN = $article->getStoredPubId('other::urnDNB');
+ $articleURN = $article->getStoredPubId('other::urnDNB');
if (empty($articleURN)) $articleURN = $article->getStoredPubId('other::urn');
if (!empty($articleURN)) {
throw new ErrorException(MESSAGE_URN_SET, URN_SET);
@@ -217,7 +218,7 @@ function &process(&$pubObject) {
$abstract = mb_substr($abstract, 0, 996,"UTF-8");
$abstract .= '...';
}
- $abstractURL = $request->url(null, 'article', 'view', array($article->getId()));
+ $abstractURL = $request->url($journal->getPath(), 'article', 'view', array($article->getId()));
$datafield520 = $this->createDatafieldNode($doc, $recordNode, '520', '3', ' ');
$this->createSubfieldNode($doc, $datafield520, 'a', $abstract);
$this->createSubfieldNode($doc, $datafield520, 'u', $abstractURL);
@@ -230,7 +231,7 @@ function &process(&$pubObject) {
if (empty($copyrightNotice)) $copyrightNotice = $journal->getSetting('copyrightNotice', $journal->getPrimaryLocale());
if (!empty($copyrightNotice)) {
// link to the article view page where the copyright notice can be found
- $licenseURL = $request->url(null, 'article', 'view', array($article->getId()));
+ $licenseURL = $request->url($journal->getPath(), 'article', 'view', array($article->getId()));
}
}
if (!empty($licenseURL)) {
@@ -279,7 +280,7 @@ function &process(&$pubObject) {
$journalDatafield773 = $this->createDatafieldNode($doc, $recordNode, '773', '1', '8');
$this->createSubfieldNode($doc, $journalDatafield773, 'x', $issn);
// file data
- $galleyURL = $request->url(null, 'article', 'view', array($article->getId(), $galley->getId()));
+ $galleyURL = $request->url($journal->getPath(), 'article', 'view', array($article->getId(), $galley->getId()));
$datafield856 = $this->createDatafieldNode($doc, $recordNode, '856', '4', ' ');
$this->createSubfieldNode($doc, $datafield856, 'u', $galleyURL);
$this->createSubfieldNode($doc, $datafield856, 'q', $this->_getGalleyFileType($galley));
diff --git a/scheduledTasks.xml b/scheduledTasks.xml
index 5a6e8c1..068d577 100644
--- a/scheduledTasks.xml
+++ b/scheduledTasks.xml
@@ -17,10 +17,8 @@
-
diff --git a/templates/settingsForm.tpl b/templates/settingsForm.tpl
index da8c435..365898f 100644
--- a/templates/settingsForm.tpl
+++ b/templates/settingsForm.tpl
@@ -36,10 +36,10 @@
{fbvElement type="text" id="folderId" value=$folderId label="plugins.importexport.dnb.settings.form.folderId" maxlength="50" size=$fbvStyles.size.MEDIUM}
{translate key="plugins.importexport.dnb.settings.form.folderId.description"}
{/fbvFormSection}
-{** {fbvFormSection list="true"}
-* {fbvElement type="checkbox" id="automaticDeposit" label="plugins.importexport.dnb.settings.form.automaticDeposit.description" checked=$automaticDeposit|compare:true}
-* {/fbvFormSection}
- *}
+ {fbvFormSection list="true"}
+ {fbvElement type="checkbox" id="automaticDeposit" label="plugins.importexport.dnb.settings.form.automaticDeposit.description" checked=$automaticDeposit|compare:true}
+ {/fbvFormSection}
+
{/fbvFormArea}
{fbvFormButtons submitText="common.save"}