-
Notifications
You must be signed in to change notification settings - Fork 457
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
[PKP-LIB][stable-3_4_0] #11011 Fix title assignment functionality #11139
base: stable-3_4_0
Are you sure you want to change the base?
Conversation
$newTitles = []; | ||
|
||
// Get the explicitely provided user titles |
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.
// Get the explicitely provided user titles | |
// Get the explicitly provided user titles |
$newTitles[$locale] = null; | ||
continue; | ||
} | ||
|
||
$newTitles[$locale] = $inputTitle; | ||
// Check if there is a display title for the NMI. If not for this locale, explicitely define one |
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.
// Check if there is a display title for the NMI. If not for this locale, explicitely define one | |
// Check if there is a display title for the NMI and the given locale. If not, explicitly define one |
if (!isset($originalDisplayTitles[$locale])) { | ||
$newTitles[$locale] = $trimmedTitle; | ||
continue; | ||
} | ||
|
||
// Update title if explicitly defined or changed from default | ||
if (isset($localizedTitlesFromDB[$locale]) || $originalDisplayTitles[$locale] !== $trimmedTitle) { | ||
$newTitles[$locale] = $trimmedTitle; | ||
} |
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 left as:
if (!isset($originalDisplayTitles[$locale])) { | |
$newTitles[$locale] = $trimmedTitle; | |
continue; | |
} | |
// Update title if explicitly defined or changed from default | |
if (isset($localizedTitlesFromDB[$locale]) || $originalDisplayTitles[$locale] !== $trimmedTitle) { | |
$newTitles[$locale] = $trimmedTitle; | |
} | |
// Update title if explicitly defined or changed from default | |
if (isset($localizedTitlesFromDB[$locale]) || ($originalDisplayTitles[$locale] ?? null) !== $trimmedTitle) { | |
$newTitles[$locale] = $trimmedTitle; | |
} |
No description provided.