Skip to content

Commit

Permalink
#21239 setting flag for move action so the refresh can happen only if…
Browse files Browse the repository at this point in the history
… necessary (#21473)
  • Loading branch information
fabrizzio-dotCMS committed Jan 6, 2022
1 parent 020168d commit 961ffa1
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import com.dotmarketing.portlets.contentlet.model.Contentlet;
import com.dotmarketing.portlets.contentlet.model.ContentletVersionInfo;
import com.dotmarketing.portlets.contentlet.model.IndexPolicyProvider;
import com.dotmarketing.portlets.contentlet.util.ActionletUtil;
import com.dotmarketing.portlets.contentlet.util.ContentletUtil;
import com.dotmarketing.portlets.fileassets.business.FileAssetAPI;
import com.dotmarketing.portlets.fileassets.business.FileAssetValidationException;
Expand Down Expand Up @@ -1814,6 +1815,15 @@ public Map<String,Object> saveContent(List<String> formData, boolean isAutoSave,
// if it is save and publish, the save event must be not generated
newInode = contentletWebAPI
.saveContent(contentletFormData, isAutoSave, isCheckin, user, !publish);

final String workflowActionId = (String)contentletFormData.get("wfActionId");
callbackData.put("isMoveAction", false);
if(UtilMethods.isSet(workflowActionId)){
final WorkflowAction workflowAction = APILocator.getWorkflowAPI().findAction(workflowActionId, APILocator.systemUser());
if(null != workflowAction){
callbackData.put("isMoveAction", ActionletUtil.isMoveableActionlet(workflowAction));
}
}

Contentlet contentlet = (Contentlet) contentletFormData.get(WebKeys.CONTENTLET_EDIT);
if (null != contentlet) {
Expand Down

0 comments on commit 961ffa1

Please sign in to comment.