custenv Overrule.DEFAULT wijzigingen beter detecteren
svn path=/Website/trunk/; revision=28801
This commit is contained in:
@@ -74,13 +74,13 @@ function tryOverrule(path)
|
||||
{
|
||||
DEFAULT: function (naam, type, waarde)
|
||||
{
|
||||
var v = Application("SET_" + customerId + "_" + naam);
|
||||
var v = Application("SET_DEFAULT_" + naam);
|
||||
if (typeof v == "undefined" ||
|
||||
type != Application("SET_T_" + naam) ||
|
||||
waarde != Application("SET_" + customerId + "_" + naam))
|
||||
waarde != Application("SET_DEFAULT_" + naam))
|
||||
{
|
||||
Application.Lock();
|
||||
Application("SET_" + customerId + "_" + naam) = waarde;
|
||||
Application("SET_DEFAULT_" + naam) = waarde;
|
||||
Application("SET_T_" + naam) = type; // Is voor alle klanten gelijk
|
||||
Application.UnLock();
|
||||
__SafeDoLog("Default for setting {0} ({1}) set to <em>{2}</em> by cust/custenv.wsc DEFAULT".format(naam, type, waarde), "#FF0000");
|
||||
|
||||
@@ -118,15 +118,13 @@ settings =
|
||||
finalTry: false, // semi-globale ipv. parameter om nasty-recursion te voorkomen
|
||||
get_setting : function (s, defval)
|
||||
{
|
||||
var v = Application("SET_" + customerId + "_" + s);
|
||||
if (s.toLowerCase() in settings.overrule)
|
||||
{
|
||||
if (typeof v == "undefined")
|
||||
{
|
||||
__SafeDoLog("Setting '" + s + "' is undefined! Fallback to cust/custenv.wsc overrule: <em>" + settings.overrule[s.toLowerCase()] + "</em>", "#FF0000");
|
||||
}
|
||||
return settings.overrule[s.toLowerCase()];
|
||||
}
|
||||
|
||||
var v = Application("SET_" + customerId + "_" + s);
|
||||
if (typeof v == "undefined")
|
||||
var v = Application("SET_DEFAULT_" + s); // Overrule.DEFAULT uit custenv.wsc
|
||||
|
||||
try
|
||||
{
|
||||
if (typeof v == "undefined")
|
||||
@@ -177,7 +175,7 @@ settings =
|
||||
{
|
||||
if (typeof defval != "undefined")
|
||||
return defval;
|
||||
__DoLog("<div style='background-color: #FF0000;'>Could not retrieve setting " + s + "\n" + e.description);
|
||||
__DoLog("Could not retrieve setting " + s + "\n" + e.description, "FF0000");
|
||||
var txt = "Could not retrieve setting <strong>" + s + "</strong><br>" + e.description;
|
||||
var sql = "SELECT MAX(adm_tracking_date)"
|
||||
+ " FROM adm_tracking"
|
||||
@@ -185,12 +183,10 @@ settings =
|
||||
var oRs = Oracle.Execute(sql);
|
||||
if (!oRs.Eof)
|
||||
{
|
||||
txt += "<br>FAC_SET.SRC was last loaded " + toDateTimeString(oRs(0).Value);
|
||||
__DoLog("FAC_SET.SRC was last loaded " + toDateTimeString(oRs(0).Value));
|
||||
}
|
||||
oRs.Close()
|
||||
try { Response.Clear; } catch (e) {};
|
||||
Response.Write("<div style='background-color: #FFFF00;'>" + txt + "</div>")
|
||||
eval("INTERNAL_ERROR_MISSING_SETTING_"+s+"");
|
||||
eval("INTERNAL_ERROR_MISSING_SETTING_"+s);
|
||||
}
|
||||
else
|
||||
{ // Kan gebeuren vlak na een upgrade als mensen binnenkomen via SSO of via een API
|
||||
|
||||
Reference in New Issue
Block a user