Skip to content

Commit

Permalink
#11638: Using _show_working_ for Time Machine
Browse files Browse the repository at this point in the history
  • Loading branch information
oarrietadotcms committed May 23, 2017
1 parent 2dea3d4 commit 16f55b4
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@ else if(type.baseType() == BaseContentType.WIDGET && !Config.getBooleanProperty
throw new ResourceNotFoundException("cannnot find contentlet id " + argument + " lang:" + params.language);
}

boolean showWorking = false;

return (params.live)
? "/live/" + argument + "_" + cv.getLang() + "." + EXTENSION
: "/working/" + argument + "_" + cv.getLang() + "." + EXTENSION;


if (context.get("_show_working_") != null && (boolean)context.get("_show_working_")) {
showWorking = true;
}

return (params.live && !showWorking)
? "/live/" + argument + "_" + cv.getLang() + "." + EXTENSION
: "/working/" + argument + "_" + cv.getLang() + "." + EXTENSION;
}
}

0 comments on commit 16f55b4

Please sign in to comment.