Skip to content

Commit

Permalink
LDEV-4931 add inspectTemplate to getApplicationSettings()
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Jun 21, 2024
1 parent ef18e46 commit 45668ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,13 @@ public static Struct call(PageContext pc, boolean suppressFunctions, boolean onl
if (!sxml.containsKey(name)) sxml.setEL(name, xmlFeatures.get(name));
}
}
sct.setEL("xmlFeatures", sxml);
int _inspectTemplate = ((ConfigPro) pc.getConfig()).getInspectTemplate();
String inspectTemplate = "once";
if (_inspectTemplate == ConfigPro.INSPECT_ALWAYS) inspectTemplate = "always";
else if (_inspectTemplate == ConfigPro.INSPECT_NEVER) inspectTemplate = "never";

sct.setEL("xmlFeatures", sxml);
sct.setEL("inspectTemplate", inspectTemplate);
sct.setEL("customTagPaths", toArray(ac.getCustomTagMappings()));
sct.setEL("componentPaths", toArray(ac.getComponentMappings()));
sct.setEL("loginStorage", AppListenerUtil.translateLoginStorage(ac.getLoginStorage()));
Expand Down
3 changes: 3 additions & 0 deletions test/functions/getApplicationSettings.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ component extends="org.lucee.cfml.test.LuceeTestCase" {
expect( as ).toHaveKey("bufferoutput");
expect( as ).toHaveKey("suppresscontent");
expect( as ).toHaveKey("componentDataMemberAccess");
expect( as.componentDataMemberAccess ).toBe( "public" );
expect( as ).toHaveKey("inspectTemplate");
expect( as.inspectTemplate ).toBe( "once" );
});
});
}
Expand Down

0 comments on commit 45668ae

Please sign in to comment.