'mysql_host' => 'database_config',
'mysql_dbase' => 'database_config',
'mysql_prefix' => 'database_config',
- 'mysql_type' => 'database_config',
+ 'mysql_engine' => 'database_config',
'mysql_login' => 'database_config',
'mysql_password1' => 'database_config',
'mysql_password2' => 'database_config',
'/ARRAY/',
array('MyISAM', 'InnoDB'),
array('{--INSTALLER_TABLE_TYPE_MYISAM--}', '{--INSTALLER_TABLE_TYPE_INNODB--}'),
- getSession('mysql_type')
+ getSession('mysql_engine')
);
}
return $isValid;
}
-// Call-back function to check validity of 'mysql_type'
+// Call-back function to check validity of 'mysql_engine'
function isInstallerMysqlTypeValid ($value) {
// This value must be 'MyISAM' or 'InnoDB'
$isValid = in_array($value, array('MyISAM', 'InnoDB'));
// Could not find database
$GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_SELECT_FAILED--}';
array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_dbase');
+
+ // Disconnect here, we don't need idle database connections laying around
+ SQL_CLOSE(__FUNCTION__, __LINE__);
+
+ // Abort here
return FALSE;
} // END - if
setConfigEntry('_MYSQL_PREFIX', postRequestElement('mysql_prefix'));
// Get an array of all supported engines
- $engines = getArrayFromSupportedSqlEngines();
+ $engines = getArrayFromSupportedSqlEngines(postRequestElement('mysql_engine'));
// Is this an array?
if (!is_array($engines)) {
// Something bad happened
$GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_ENGINES_SQL_ERROR--}';
- array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_type');
+ array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_engine');
+
+ // Disconnect here, we don't need idle database connections laying around
+ SQL_CLOSE(__FUNCTION__, __LINE__);
+
+ // Abort here
return FALSE;
} elseif (count($engines) == 0) {
// No engine is active
$GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_NO_ENGINES_ACTIVE--}';
- array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_type');
+ array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_engine');
+
+ // Disconnect here, we don't need idle database connections laying around
+ SQL_CLOSE(__FUNCTION__, __LINE__);
+
+ // Abort here
return FALSE;
}
$engineValid = FALSE;
// Is the engine there?
- if (strtolower($engineArray['Engine']) == strtolower(postRequestElement('mysql_type'))) {
+ if (strtolower($engineArray['Engine']) == strtolower(postRequestElement('mysql_engine'))) {
// Okay, engine is found
$engineValid = TRUE;
break;
if ($engineValid === FALSE) {
// Requested engine is not active
$GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_ENGINE_UNSUPPORTED--}';
- array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_type');
+ array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_engine');
+
+ // Disconnect here, we don't need idle database connections laying around
+ SQL_CLOSE(__FUNCTION__, __LINE__);
+
+ // Abort here
return FALSE;
} // END - if