Fixed missing MongoDB Logsource support in Installer script.

Don't forget to change Tabletype to MongoDB
This commit is contained in:
Andre Lorbach 2012-08-21 15:52:01 +02:00
parent 8ea4cd7f08
commit 866c3ab7f4
2 changed files with 30 additions and 4 deletions

View File

@ -699,7 +699,10 @@ else if ( $content['INSTALL_STEP'] == 8 )
if ( !is_file($_SESSION['SourceDiskFile']) ) if ( !is_file($_SESSION['SourceDiskFile']) )
RevertOneStep( $content['INSTALL_STEP']-1, GetAndReplaceLangStr($content['LN_INSTALL_FAILEDTOOPENSYSLOGFILE'], $_SESSION['SourceDiskFile']) ); RevertOneStep( $content['INSTALL_STEP']-1, GetAndReplaceLangStr($content['LN_INSTALL_FAILEDTOOPENSYSLOGFILE'], $_SESSION['SourceDiskFile']) );
} }
else if ( $_SESSION['SourceType'] == SOURCE_DB || $_SESSION['SourceType'] == SOURCE_PDO ) // DB Params
else if ( $_SESSION['SourceType'] == SOURCE_DB ||
$_SESSION['SourceType'] == SOURCE_PDO ||
$_SESSION['SourceType'] == SOURCE_MONGODB )
{ {
if ( isset($_POST['SourceDBType']) ) if ( isset($_POST['SourceDBType']) )
$_SESSION['SourceDBType'] = DB_RemoveBadChars($_POST['SourceDBType']); $_SESSION['SourceDBType'] = DB_RemoveBadChars($_POST['SourceDBType']);
@ -866,6 +869,20 @@ else if ( $content['INSTALL_STEP'] == 8 )
"\$CFG['Sources']['Source1']['DBEnableRowCounting'] = " . $_SESSION['SourceDBEnableRowCounting'] . ";\n" . "\$CFG['Sources']['Source1']['DBEnableRowCounting'] = " . $_SESSION['SourceDBEnableRowCounting'] . ";\n" .
""; "";
} }
else if ( $_SESSION['SourceType'] == SOURCE_MONGODB )
{
// Need to create the LIST first!
CreateDBTypesList($_SESSION['SourceDBType']);
$firstsource .= "\$CFG['Sources']['Source1']['SourceType'] = SOURCE_MONGODB;\n" .
"\$CFG['Sources']['Source1']['DBTableType'] = '" . $_SESSION['SourceDBTableType'] . "';\n" .
"\$CFG['Sources']['Source1']['DBServer'] = '" . $_SESSION['SourceDBServer'] . "';\n" .
"\$CFG['Sources']['Source1']['DBName'] = '" . $_SESSION['SourceDBName'] . "';\n" .
"\$CFG['Sources']['Source1']['DBUser'] = '" . $_SESSION['SourceDBUser'] . "';\n" .
"\$CFG['Sources']['Source1']['DBPassword'] = '" . $_SESSION['SourceDBPassword'] . "';\n" .
"\$CFG['Sources']['Source1']['DBTableName'] = '" . $_SESSION['SourceDBTableName'] . "';\n" .
"";
}
$patterns[] = "/\/\/ --- \%Insert Source Here\%/"; $patterns[] = "/\/\/ --- \%Insert Source Here\%/";
$replacements[] = $firstsource; $replacements[] = $firstsource;

View File

@ -25,14 +25,23 @@
showvisibility("HiddenDatabaseTypeOptions"); showvisibility("HiddenDatabaseTypeOptions");
hidevisibility("HiddenDiskTypeOptions"); hidevisibility("HiddenDiskTypeOptions");
hidevisibility("HiddenDBTYpesOptions"); hidevisibility("HiddenPDOSourceOptions");
// hidevisibility("HiddenDBTYpesOptions");
} }
else if (myfield.value == 3) else if (myfield.value == 3)
{ {
showvisibility("HiddenDatabaseTypeOptions"); showvisibility("HiddenDatabaseTypeOptions");
hidevisibility("HiddenDiskTypeOptions"); hidevisibility("HiddenDiskTypeOptions");
showvisibility("HiddenDBTYpesOptions"); showvisibility("HiddenPDOSourceOptions");
// showvisibility("HiddenDBTYpesOptions");
}
else if (myfield.value == 4)
{
showvisibility("HiddenDatabaseTypeOptions");
hidevisibility("HiddenDiskTypeOptions");
hidevisibility("HiddenPDOSourceOptions");
} }
} }
@ -453,7 +462,7 @@
<tr><td align="center" class="cellmenu1" colspan="2"><b>{LN_CFG_DATABASETYPEOPTIONS}</b></td></tr> <tr><td align="center" class="cellmenu1" colspan="2"><b>{LN_CFG_DATABASETYPEOPTIONS}</b></td></tr>
</table> </table>
<div id="HiddenDBTYpesOptions" class="HiddenContent"> <div id="HiddenPDOSourceOptions" class="HiddenContent">
<table border="0" cellpadding="1" cellspacing="1" width="600" align="center" class="with_border"> <table border="0" cellpadding="1" cellspacing="1" width="600" align="center" class="with_border">
<tr> <tr>
<td align="left" class="cellmenu2" width="150" nowrap><b>{LN_CFG_DBSTORAGEENGINE}</b></td> <td align="left" class="cellmenu2" width="150" nowrap><b>{LN_CFG_DBSTORAGEENGINE}</b></td>