Added support to import/convert new source options

This commit is contained in:
Andre Lorbach 2008-09-02 17:26:53 +02:00
parent c740edd9fe
commit a36c801960

View File

@ -160,9 +160,11 @@ function ConvertCustomSources()
// Add New Entry
if ( $mySource['SourceType'] == SOURCE_DISK )
{
$result = DB_Query("INSERT INTO " . DB_SOURCES . " (Name, SourceType, ViewID, LogLineType, DiskFile) VALUES ( " .
$result = DB_Query("INSERT INTO " . DB_SOURCES . " (Name, SourceType, MsgParserList, MsgNormalize, ViewID, LogLineType, DiskFile) VALUES ( " .
"'" . PrepareValueForDB($mySource['Name']) . "', " .
" " . PrepareValueForDB($mySource['SourceType']) . " , " .
"'" . PrepareValueForDB($mySource['MsgParserList']) . "', " .
" " . PrepareValueForDB($mySource['MsgNormalize']) . " , " .
"'" . PrepareValueForDB($mySource['ViewID']) . "', " .
"'" . PrepareValueForDB($mySource['LogLineType']) . "', " .
"'" . PrepareValueForDB($mySource['DiskFile']) . "'" .
@ -179,9 +181,11 @@ function ConvertCustomSources()
$mySource['DBType'] = DB_MYSQL;
// Perform the insert
$result = DB_Query("INSERT INTO " . DB_SOURCES . " (Name, SourceType, ViewID, DBTableType, DBType, DBServer, DBName, DBUser, DBPassword, DBTableName, DBEnableRowCounting) VALUES ( " .
$result = DB_Query("INSERT INTO " . DB_SOURCES . " (Name, SourceType, MsgParserList, MsgNormalize, ViewID, DBTableType, DBType, DBServer, DBName, DBUser, DBPassword, DBTableName, DBEnableRowCounting) VALUES ( " .
"'" . PrepareValueForDB($mySource['Name']) . "', " .
" " . PrepareValueForDB($mySource['SourceType']) . " , " .
"'" . PrepareValueForDB($mySource['MsgParserList']) . "', " .
" " . PrepareValueForDB($mySource['MsgNormalize']) . " , " .
"'" . PrepareValueForDB($mySource['ViewID']) . "', " .
"'" . PrepareValueForDB($mySource['DBTableType']) . "', " .
" " . PrepareValueForDB($mySource['DBType']) . " , " .