mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
94379: Merged 5.0.N (5.0.1) to HEAD-BUG-FIX (5.1/Cloud) 94324: Merged DEV to V5.0.N (5.0.1) 94107: MNT-13084: Invitation email to the site are not received - Support both Object[] and List<> subject params. 94248: MNT-13084: Invitation email to the site are not received - Add support for String value in PARAM_SUBJECT_PARAMS - Add unit test. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@95080 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -933,9 +933,25 @@ public class MailActionExecuter extends ActionExecuterAbstractBase
|
||||
|
||||
// set subject line
|
||||
String subject = (String)ruleAction.getParameterValue(PARAM_SUBJECT);
|
||||
List<Object> subjectParams = (List<Object>)ruleAction.getParameterValue(PARAM_SUBJECT_PARAMS);
|
||||
subjectParams = subjectParams == null ? new ArrayList<Object>() : subjectParams;
|
||||
String localizedSubject = getLocalizedSubject(subject, subjectParams.toArray(), locale);
|
||||
Object subjectParamsObject = ruleAction.getParameterValue(PARAM_SUBJECT_PARAMS);
|
||||
Object[] subjectParams = null;
|
||||
//Javasctipt pass SubjectParams as ArrayList. see MNT-12534
|
||||
if (subjectParamsObject instanceof List)
|
||||
{
|
||||
subjectParams = ((List<Object>)subjectParamsObject).toArray();
|
||||
}
|
||||
else if (subjectParamsObject instanceof Object[])
|
||||
{
|
||||
subjectParams = (Object[])subjectParamsObject;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (subjectParamsObject != null)
|
||||
{
|
||||
subjectParams = new Object[]{subjectParamsObject.toString()};
|
||||
}
|
||||
}
|
||||
String localizedSubject = getLocalizedSubject(subject, subjectParams, locale);
|
||||
if (locale == null)
|
||||
{
|
||||
// process the template against the model
|
||||
|
Reference in New Issue
Block a user