GenericValue contentAssocViewFrom = ContentWorker.getContentAssocViewFrom(delegator, contentIdTo, contentId, contentAssocTypeId, statusId, privilegeEnumId);
if (contentAssocViewFrom != null)
isPublished = true;
if (Debug.infoOn()) Debug.logInfo("in publishContent, contentId:" + contentId + " contentIdTo:" + contentIdTo + " contentAssocTypeId:" + contentAssocTypeId + " publish:" + publish + " isPublished:" + isPublished, module);
if (UtilValidate.isNotEmpty(publish) && publish.equalsIgnoreCase("Y")) {
GenericValue content = delegator.findByPrimaryKey("Content", UtilMisc.toMap("contentId", contentId));
String contentStatusId = (String) content.get("statusId");
String contentPrivilegeEnumId = (String) content.get("privilegeEnumId");
if (Debug.infoOn()) Debug.logInfo("in publishContent, statusId:" + statusId + " contentStatusId:" + contentStatusId + " privilegeEnumId:" + privilegeEnumId + " contentPrivilegeEnumId:" + contentPrivilegeEnumId, module);
// Don't do anything if link was already there