Skip to content

Commit 08490ec

Browse files
authored
Merge pull request #1173 from kaitlinnewson/12182-3_3_0
pkp/pkp-lib#12182 remove ucfirst from names in crossref plugin
2 parents 96ee1f4 + 02b745f commit 08490ec

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

plugins/importexport/crossref/filter/PreprintCrossrefXmlFilter.inc.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ function createPostedContentNode($doc, $publication, $submission) {
163163
// Check if both givenName and familyName is set for the submission language.
164164
if (!empty($familyNames[$locale]) && !empty($givenNames[$locale])) {
165165
$personNameNode->setAttribute('language', PKPLocale::getIso1FromLocale($locale));
166-
$personNameNode->appendChild($node = $doc->createElementNS($deployment->getNamespace(), 'given_name', htmlspecialchars(ucfirst($givenNames[$locale]), ENT_COMPAT, 'UTF-8')));
167-
$personNameNode->appendChild($node = $doc->createElementNS($deployment->getNamespace(), 'surname', htmlspecialchars(ucfirst($familyNames[$locale]), ENT_COMPAT, 'UTF-8')));
166+
$personNameNode->appendChild($node = $doc->createElementNS($deployment->getNamespace(), 'given_name', htmlspecialchars($givenNames[$locale], ENT_COMPAT, 'UTF-8')));
167+
$personNameNode->appendChild($node = $doc->createElementNS($deployment->getNamespace(), 'surname', htmlspecialchars($familyNames[$locale], ENT_COMPAT, 'UTF-8')));
168168

169169
$hasAltName = false;
170170
foreach($familyNames as $otherLocal => $familyName) {
@@ -179,17 +179,17 @@ function createPostedContentNode($doc, $publication, $submission) {
179179
$nameNode = $doc->createElementNS($deployment->getNamespace(), 'name');
180180
$nameNode->setAttribute('language', PKPLocale::getIso1FromLocale($otherLocal));
181181

182-
$nameNode->appendChild($node = $doc->createElementNS($deployment->getNamespace(), 'surname', htmlspecialchars(ucfirst($familyName), ENT_COMPAT, 'UTF-8')));
182+
$nameNode->appendChild($node = $doc->createElementNS($deployment->getNamespace(), 'surname', htmlspecialchars($familyName, ENT_COMPAT, 'UTF-8')));
183183
if (isset($givenNames[$otherLocal]) && !empty($givenNames[$otherLocal])) {
184-
$nameNode->appendChild($node = $doc->createElementNS($deployment->getNamespace(), 'given_name', htmlspecialchars(ucfirst($givenNames[$otherLocal]), ENT_COMPAT, 'UTF-8')));
184+
$nameNode->appendChild($node = $doc->createElementNS($deployment->getNamespace(), 'given_name', htmlspecialchars($givenNames[$otherLocal], ENT_COMPAT, 'UTF-8')));
185185
}
186186

187187
$altNameNode->appendChild($nameNode);
188188
}
189189
}
190190

191191
} else {
192-
$personNameNode->appendChild($node = $doc->createElementNS($deployment->getNamespace(), 'surname', htmlspecialchars(ucfirst($givenNames[$locale]), ENT_COMPAT, 'UTF-8')));
192+
$personNameNode->appendChild($node = $doc->createElementNS($deployment->getNamespace(), 'surname', htmlspecialchars($givenNames[$locale], ENT_COMPAT, 'UTF-8')));
193193
}
194194

195195
if ($author->getData('orcid')) {
@@ -285,5 +285,3 @@ function createRelationsDataNode($doc, $parentDoi) {
285285
return $relationsDataNode;
286286
}
287287
}
288-
289-

0 commit comments

Comments
 (0)