ACE-5639: Comment Activitiy Feed Entries made outside of site show @@NULL@@

- If siteInfo does not exists do not post comment related activity

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@133567 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ramona Neamtu
2016-12-12 13:25:58 +00:00
parent cfed51f84b
commit b820de9d7e

View File

@@ -234,14 +234,14 @@ public abstract class AbstractCommentsWebScript extends DeclarativeWebScript
SiteInfo siteInfo = getSiteInfo(req, COMMENT_CREATED_ACTIVITY.equals(activityType));
// post an activity item, but only if we've got a site
if (siteInfo != null)
{
siteId = siteInfo.getShortName();
if (siteId == null || siteId.length() == 0)
{
return;
}
// post an activity item, but only if we've got a site
if (siteInfo == null || siteInfo.getShortName() == null || siteInfo.getShortName().length() == 0)
{
return;
}
else
{
siteId = siteInfo.getShortName();
}
// json is not sent null with this activity type - only for delete