-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OMP Native Import/Export Plugin v3.2 #775
Conversation
plugins/importexport/native/filter/MonographFileNativeXmlFilter.inc.php
Outdated
Show resolved
Hide resolved
* Constructor | ||
* @param $filterGroup FilterGroup | ||
*/ | ||
function __construct($filterGroup) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Another dead constructor)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
* @param $document DOMDocument|string | ||
* @return array Array of imported documents | ||
*/ | ||
function &process(&$document) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be removed...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
* Constructor | ||
* @param $filterGroup FilterGroup | ||
*/ | ||
function __construct($filterGroup) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Another dead constructor)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
} | ||
// if ($publication->getData('subtitle')) { | ||
// $titleElementNode->appendChild($this->_buildTextNode($doc, 'Subtitle', $publication->getData('subtitle'))); | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this commented for a reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$publication->getData('subtitle')
is an array (localized), and _buildTextNode
expects string. I was looking for alternatives here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ONIX is not multilingual-capable, so I would suggest using the values for the submission's locale. (Generally we should also be avoiding getLocalizedData
because it gets the content based on the current user's locale -- exports should not depend on the user's language, so getData('subtitle', $publication->getData('locale'))
is preferred.)
* Get the publication node name | ||
* @return string | ||
*/ | ||
function getPublicationNodeName() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this abstraction adds anything, since we're using publication
(and publications
) throughout -- I think this pattern comes from cases where we need different element names (article
in OJS, monograph
in OMP). So I'd suggest removing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[removed from OJS and pkp-lib, can remove here without anything more]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
No description provided.