From 3f0d45efe9eb7bb7378bcd4b185b6c65e751cefc Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Thu, 17 Jul 2008 11:25:34 +0200 Subject: [PATCH] Fixed a little bug in the installer, which was missing to save the DBType for MYSQL Datasource. This isn't really an issue as the DBTYPE can only be MYSQL for this Source. However it caused an unnecessary NOTICE issue when debugging was enabled. --- src/include/functions_config.php | 7 ++++++- src/install.php | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/include/functions_config.php b/src/include/functions_config.php index b9eaac3..4ff98ee 100644 --- a/src/include/functions_config.php +++ b/src/include/functions_config.php @@ -102,7 +102,12 @@ $content['Sources'][$iSourceID]['ObjRef'] = new LogStreamConfigDB(); $content['Sources'][$iSourceID]['ObjRef']->DBServer = $mysource['DBServer']; $content['Sources'][$iSourceID]['ObjRef']->DBName = $mysource['DBName']; - $content['Sources'][$iSourceID]['ObjRef']->DBType = $mysource['DBType']; + // Workaround a little bug from the installer script + if ( isset($mysource['DBType']) ) + $content['Sources'][$iSourceID]['ObjRef']->DBType = $mysource['DBType']; + else + $content['Sources'][$iSourceID]['ObjRef']->DBType = DB_MYSQL; + $content['Sources'][$iSourceID]['ObjRef']->DBTableName = $mysource['DBTableName']; // Legacy handling for tabletype! diff --git a/src/install.php b/src/install.php index 1fbc98b..e683e03 100644 --- a/src/install.php +++ b/src/install.php @@ -644,8 +644,12 @@ else if ( $content['INSTALL_STEP'] == 8 ) } else if ( $_SESSION['SourceType'] == SOURCE_DB ) { + // Need to create the LIST first! + CreateDBTypesList($_SESSION['SourceDBType']); + $firstsource .= "\$CFG['Sources']['Source1']['SourceType'] = SOURCE_DB;\n" . "\$CFG['Sources']['Source1']['DBTableType'] = '" . $_SESSION['SourceDBTableType'] . "';\n" . + "\$CFG['Sources']['Source1']['DBType'] = " . $content['DBTYPES'][$_SESSION['SourceDBType']]['typeastext'] . ";\n" . "\$CFG['Sources']['Source1']['DBServer'] = '" . $_SESSION['SourceDBServer'] . "';\n" . "\$CFG['Sources']['Source1']['DBName'] = '" . $_SESSION['SourceDBName'] . "';\n" . "\$CFG['Sources']['Source1']['DBUser'] = '" . $_SESSION['SourceDBUser'] . "';\n" .