fac_verify.inc (aanwezigheid van) hookfunctions ook controleren

svn path=/Website/branches/v2019.1/; revision=42049
This commit is contained in:
Jos Groot Lipman
2019-04-10 08:19:33 +00:00
parent 8761fe86de
commit bda574573a

View File

@@ -832,6 +832,30 @@ checker(rooturl + "/cust/"+custID+"/xsl/" + custID + ".xsl file available",
}
)
if (this.settings)
{
checker("Hook functions defined",
function ()
{
if (!S("custfunctionspath"))
return { result: resultcodes.ok, message: "No overrule defined in setting S(\"custfunctionspath\")" };
var hookfile = Server.MapPath(rooturl + "/" + S("custfunctionspath"));
if (!fso.FileExists(hookfile))
return { result: resultcodes.faile, message: "Hookfile {0} not found".format(hookfile) };
try {
var hook = GetObject("script:" + hookfile);
}
catch (e)
{
return { result: resultcodes.error,
message: "Error loading hookfile {0}:<br>{1}.".format(hookfile, safe.html(e.description))};
}
hook = null; // zorg dat de GC het object kan opruimen.
return { result: resultcodes.ok, message: "Hookfile {0} found and loadable".format(hookfile) };
}
)
}
__GROUP = "Settings";
var puostring = "puo_forcemailaddress,puo_forcefromaddress,puo_forceorderaddress,puo_forcemobile,puo_fclt_web_url";