Small fixes for logging frmValidator
This commit is contained in:
parent
3114bfc123
commit
96456077e2
@ -67,10 +67,14 @@ Public Class clsPatterns
|
||||
Return New Pattern(type, value).ToString
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function ReplaceAllValues(input As String, panel As Panel, is_SQL As Boolean) As String
|
||||
Try
|
||||
Dim result = input
|
||||
|
||||
If Not HasAnyPatterns(result) Then
|
||||
Return result
|
||||
End If
|
||||
|
||||
LOGGER.Debug($"input BEFORE replacing: [{result}]")
|
||||
result = ReplaceInternalValues(result)
|
||||
result = ReplaceControlValues(result, panel, is_SQL)
|
||||
@ -117,7 +121,6 @@ Public Class clsPatterns
|
||||
oResult = ReplacePattern(oResult, PATTERN_INT, Now.ToShortDateString)
|
||||
End While
|
||||
|
||||
LOGGER.Debug("pInput AFTER ReplaceInternalValues: " & pInput)
|
||||
Return oResult
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
@ -166,7 +169,6 @@ Public Class clsPatterns
|
||||
End If
|
||||
result = ReplacePattern(result, PATTERN_USER, CURRENT_CLICKED_PROFILE_TITLE)
|
||||
End While
|
||||
LOGGER.Debug("pInput AFTER ReplaceUserValues: " & input)
|
||||
Return result
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
@ -246,16 +248,15 @@ Public Class clsPatterns
|
||||
oReplaceValue = ERROR_REPLACE_VALUE
|
||||
End Select
|
||||
If oIsSQL = True Then
|
||||
LOGGER.Debug($"IS_SQL = True - oReplaceValue = {oReplaceValue}")
|
||||
'LOGGER.Debug($"IS_SQL = True - oReplaceValue = {oReplaceValue}")
|
||||
'LOGGER.Debug($"oReplaceValue = {oReplaceValue}")
|
||||
oReplaceValue = oReplaceValue.Replace("'", "''")
|
||||
LOGGER.Debug($"oReplaceValue = {oReplaceValue}")
|
||||
End If
|
||||
oResult = ReplacePattern(oResult, PATTERN_CTRL, oReplaceValue)
|
||||
End If
|
||||
|
||||
oTryCounter += 1
|
||||
End While
|
||||
LOGGER.Debug("pInput AFTER ReplaceControlValues: " & pInput)
|
||||
Return oResult
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
@ -290,7 +291,6 @@ Public Class clsPatterns
|
||||
' Increase counter by 10 to avoid DDOSing the Windream Service
|
||||
oTryCounter += 10
|
||||
End While
|
||||
LOGGER.Debug("sql AFTER ReplaceWindreamIndicies: " & pInput)
|
||||
Return oResult
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
|
||||
@ -617,6 +617,8 @@ Public Class frmValidator
|
||||
End If
|
||||
'oSql = clsPatterns.ReplaceUserValues(sqlStatement, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
'oSql = clsPatterns.ReplaceInternalValues(oSql)
|
||||
|
||||
|
||||
oSQLStatement = clsPatterns.ReplaceAllValues(oSQLStatement, PanelValidatorControl, True)
|
||||
If IsNothing(oSQLStatement) Then
|
||||
Continue For
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user