diff --git a/src/install.php b/src/install.php index dc7255d..3440000 100644 --- a/src/install.php +++ b/src/install.php @@ -699,7 +699,10 @@ else if ( $content['INSTALL_STEP'] == 8 ) if ( !is_file($_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']) ) $_SESSION['SourceDBType'] = DB_RemoveBadChars($_POST['SourceDBType']); @@ -866,6 +869,20 @@ else if ( $content['INSTALL_STEP'] == 8 ) "\$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\%/"; $replacements[] = $firstsource; diff --git a/src/templates/install.html b/src/templates/install.html index 0d7d025..037fc3a 100644 --- a/src/templates/install.html +++ b/src/templates/install.html @@ -25,14 +25,23 @@ showvisibility("HiddenDatabaseTypeOptions"); hidevisibility("HiddenDiskTypeOptions"); - hidevisibility("HiddenDBTYpesOptions"); + hidevisibility("HiddenPDOSourceOptions"); +// hidevisibility("HiddenDBTYpesOptions"); } else if (myfield.value == 3) { showvisibility("HiddenDatabaseTypeOptions"); hidevisibility("HiddenDiskTypeOptions"); - showvisibility("HiddenDBTYpesOptions"); + showvisibility("HiddenPDOSourceOptions"); +// showvisibility("HiddenDBTYpesOptions"); + } + else if (myfield.value == 4) + { + showvisibility("HiddenDatabaseTypeOptions"); + hidevisibility("HiddenDiskTypeOptions"); + + hidevisibility("HiddenPDOSourceOptions"); } } @@ -453,7 +462,7 @@ {LN_CFG_DATABASETYPEOPTIONS} -
+
{LN_CFG_DBSTORAGEENGINE}