Skip to content

Commit

Permalink
Revert "LPS-200477 deleteLayoutPageTemplateIdsList.size() is always 0…
Browse files Browse the repository at this point in the history
… since we are checking in the previous if it is not empty"

This reverts commit 8f908df.
  • Loading branch information
ealonso authored and brianchandotcom committed Dec 4, 2023
1 parent b94e62b commit c71e812
Showing 1 changed file with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,21 @@ protected void doProcessAction(

hideDefaultErrorMessage(actionRequest);
}
else if (deleteLayoutPageTemplateEntryIds.length > 0) {
hideDefaultSuccessMessage(actionRequest);

MultiSessionMessages.add(
actionRequest, "displayPageTemplateDeleted",
_language.format(
_portal.getHttpServletRequest(actionRequest),
"you-successfully-deleted-x-display-page-templates",
new Object[] {deleteLayoutPageTemplateEntryIds.length}));
else {
int total =
deleteLayoutPageTemplateEntryIds.length -
deleteLayoutPageTemplateIdsList.size();

if (total > 0) {
hideDefaultSuccessMessage(actionRequest);

MultiSessionMessages.add(
actionRequest, "displayPageTemplateDeleted",
_language.format(
_portal.getHttpServletRequest(actionRequest),
"you-successfully-deleted-x-display-page-templates",
new Object[] {total}));
}
}

sendRedirect(actionRequest, actionResponse);
Expand Down

0 comments on commit c71e812

Please sign in to comment.