While looking through some core Lucee templates I saw references to localmode=“update”. (WEB-INF\lucee\context\Application.cfc)
What exactly is this localmode and what does it do?
Thanks
That’s just an alias, for classic / false
}
return mappings;
}
public static String toLocalMode(int mode, String defaultValue) {
if (Undefined.MODE_LOCAL_OR_ARGUMENTS_ALWAYS == mode) return "modern";
if (Undefined.MODE_LOCAL_OR_ARGUMENTS_ONLY_WHEN_EXISTS == mode) return "classic";
return defaultValue;
}
public static int toLocalMode(Object oMode, int defaultValue) {
if (oMode == null) return defaultValue;
if (Decision.isBoolean(oMode)) {
if (Caster.toBooleanValue(oMode, false)) return Undefined.MODE_LOCAL_OR_ARGUMENTS_ALWAYS;
return Undefined.MODE_LOCAL_OR_ARGUMENTS_ONLY_WHEN_EXISTS;
}
String strMode = Caster.toString(oMode, null);
if ("always".equalsIgnoreCase(strMode) || "modern".equalsIgnoreCase(strMode)) return Undefined.MODE_LOCAL_OR_ARGUMENTS_ALWAYS;
if ("update".equalsIgnoreCase(strMode) || "classic".equalsIgnoreCase(strMode)) return Undefined.MODE_LOCAL_OR_ARGUMENTS_ONLY_WHEN_EXISTS;
return defaultValue;