Hi Everyone,
We found a bug in OJS 3.3 when trying to add a new reviewer to a submission.
If the e-mail template uses the {$editorialContactSignature} variable, the system puts the Full Name & E-mail of the editor into the message. This happens even when the editor already has a custom signature saved in their user profile.
Current setup:
-
Tested OJS version: 3.3.0.17
-
Editor has a signature in their profile
-
The REVIEW_REQUEST and REVIEW_REQUEST_ONECLICK e-mail templates use
{$editorialContactSignature}at the end
What we expect:
- The review request mail should end with the editor’s saved signature
What happens now:
- The mail ends with the editor’s name & e-mail instead of their saved signature
Code that seems to cause the problem:
lib/pkp/classes/user/User.inc.php
function getContactSignature() {
$signature = htmlspecialchars($this->getFullName());
AppLocale::requireComponents(LOCALE_COMPONENT_PKP_USER);
if ($a = $this->getLocalizedAffiliation()) $signature .= '<br/>' . htmlspecialchars($a);
if ($p = $this->getPhone()) $signature .= '<br/>' . __('user.phone') . ' ' . htmlspecialchars($p);
$signature .= '<br/>' . htmlspecialchars($this->getEmail());
return $signature;
}
Suggested fix:
function getContactSignature() {
$signature = $this->getLocalizedSignature();
if (!empty($signature)) {
return $signature;
}
$signature = htmlspecialchars($this->getFullName());
AppLocale::requireComponents(LOCALE_COMPONENT_PKP_USER);
if ($a = $this->getLocalizedAffiliation()) $signature .= '<br/>' . htmlspecialchars($a);
if ($p = $this->getPhone()) $signature .= '<br/>' . __('user.phone') . ' ' . htmlspecialchars($p);
$signature .= '<br/>' . htmlspecialchars($this->getEmail());
return $signature;
}
Would be great if the dev team could take a look at this and confirm whether it’s a bug or the intended behavior.
Thanks a lot!