Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions core/src/org/labkey/core/wiki/RadeoxRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import org.labkey.api.util.MimeMap;
import org.labkey.api.util.PageFlowUtil;
import org.labkey.api.view.HttpView;
import org.labkey.api.view.NavTreeManager;
import org.labkey.api.view.ViewContext;
import org.labkey.api.view.menu.FolderAdminMenu;
import org.labkey.api.view.menu.NavTreeMenu;
Expand Down Expand Up @@ -84,6 +83,7 @@ public class RadeoxRenderer extends BaseRenderEngine implements WikiRenderEngine
private static final String MISSING_CLASS_NAME = "missing";
private static final String WIKI_DEPENDENCIES_KEY = "~~wiki.dependencies~~";
private static final String ANCHORS_KEY = "~~wiki.anchors~~";
private static final String VOLATILE_KEY = "~~wiki.volatile~~";
private final String _sourceDescription;

private String _wikiHrefPrefix = "?name=";
Expand Down Expand Up @@ -132,8 +132,9 @@ public FormattedHtml format(String text)
Set<String> anchors = new HashSet<>();
context.set(ANCHORS_KEY, anchors);
HtmlString html = HtmlString.unsafe(render(text, context));
boolean isVolatile = Boolean.TRUE.equals(context.get(VOLATILE_KEY));

return new FormattedHtml(html, false, dependencies, anchors); // TODO: Are there wiki pages we don't want to cache?
return new FormattedHtml(html, isVolatile, dependencies, anchors);
}

private static class NewTabLinkMacro extends LinkMacro
Expand Down Expand Up @@ -225,6 +226,9 @@ public String[] getParamDescription()

public void executeTree(Writer writer, MacroParameter params) throws IOException
{
// Menus are per-user and register per-request click handlers, so the page must never be cached
params.getContext().set(VOLATILE_KEY, true);

String treeId = params.get("name", 1);
NavTreeMenu navTree = null;
ViewContext ctx = HttpView.currentContext();
Expand All @@ -246,7 +250,6 @@ else if ("core.folderAdmin".equals(treeId))
else if ("core.siteAdmin".equals(treeId))
navTree = new SiteAdminMenu(ctx);

NavTreeManager.applyExpandState(navTree, ctx);
if (null == navTree)
{
writer.write("<!-- labkey:tree|id=" + treeId + " no permissions or not found. -->");
Expand Down