diff --git a/APPL/Shared/logger.inc b/APPL/Shared/logger.inc index 52ae767df9..5a372ee523 100644 --- a/APPL/Shared/logger.inc +++ b/APPL/Shared/logger.inc @@ -213,6 +213,7 @@ htmlLogger = theLogger = htmlLogger; // ooit geexperimenteerd met sqliteLogger +// Return true als we de logging parameter gevonden hebben in qtstring function CheckForLogging(qstring) { if (qstring && qstring.Count>0) @@ -222,7 +223,9 @@ function CheckForLogging(qstring) user.checkAutorisation("WEB_FACTAB"); // Minimaal Session("logging") = lg; + return true; } + return false; } function __LogCloseLine(handle, s_extra, optionalColor) diff --git a/APPL/Shared/wisLog.asp b/APPL/Shared/wisLog.asp index 6bcf1111d4..a6025e31bb 100644 --- a/APPL/Shared/wisLog.asp +++ b/APPL/Shared/wisLog.asp @@ -4,8 +4,8 @@ $Id$ File: WisLog.asp - Remark: Wist de html logfile - Je moet ingelogd zijn met PRSSYS rechten + Remark: Wist de html logfile of zet de logging aan/uit + Je moet ingelogd zijn met FACTAB rechten Context: Met knop vanuit de logfile */ if (Application("otap_environment") == "O") @@ -16,7 +16,18 @@ if (Application("otap_environment") == "O") Application("otap_environment") == "O" || user.checkAutorisation("WEB_FACTAB"); var fso = Server.CreateObject("Scripting.FileSystemObject"); - var logfile = Server.MapPath(rooturl + "/" + Application(customerId + "_logfilename")+".html"); + var logurl = rooturl + "/" + Application(customerId + "_logfilename")+".html"; + + if (CheckForLogging(Request.QueryString("logging"))) + { + if (Session("logging") > 0) + Response.Redirect(logurl); + else + Response.Write("Logging is nu uit"); + Response.End; + } + + var logfile = Server.MapPath(logurl); if (fso.FileExists(logfile)) { fso.DeleteFile (logfile);