diff --git a/main/install/index.php b/main/install/index.php index 376c95b22c..2b086744ac 100755 --- a/main/install/index.php +++ b/main/install/index.php @@ -213,7 +213,7 @@ if (!isset($_GET['running'])) { $dbUsernameForm = 'root'; $dbPassForm = ''; $dbPrefixForm = ''; - $dbNameForm = 'chamilo_main'; + $dbNameForm = 'main'; $dbStatsForm = 'chamilo_main'; $dbScormForm = 'chamilo_main'; $dbUserForm = 'chamilo_main'; @@ -251,9 +251,7 @@ if (!isset($_GET['running'])) { $singleDbForm = 0; $encryptPassForm = 'sha1'; $session_lifetime = 360000; - } else { - foreach ($_POST as $key => $val) { $magic_quotes_gpc = ini_get('magic_quotes_gpc'); if (is_string($val)) { @@ -361,14 +359,18 @@ if ($encryptPassForm == '1') { init_visibility=0; function show_hide_option() { if (init_visibility == 0) { - $('#optional_param1').show(); + $('#optional_param1').show(); + if ($('#singleDb1').attr("checked") == true) { - $('#optional_param2').hide(); - $('#optional_param4').hide(); + //$('#optional_param2').hide(); + //$('#optional_param4').hide(); + $('#optional_param5').hide(); } else { - $('#optional_param2').show(); - $('#optional_param4').show(); + //$('#optional_param2').show(); + //$('#optional_param4').show(); + $('#optional_param5').show(); } + //document.getElementById('optional_param2').style.display = ''; if (document.getElementById('optional_param3')) { document.getElementById('optional_param3').style.display = ''; @@ -380,16 +382,18 @@ if ($encryptPassForm == '1') { document.getElementById('optionalparameters').innerHTML=' '; } else { document.getElementById('optional_param1').style.display = 'none'; - document.getElementById('optional_param2').style.display = 'none'; + /*document.getElementById('optional_param2').style.display = 'none'; if (document.getElementById('optional_param3')) { document.getElementById('optional_param3').style.display = 'none'; } document.getElementById('optional_param4').style.display = 'none'; - //document.getElementById('optional_param5').style.display = 'none'; + */ + document.getElementById('optional_param5').style.display = 'none'; document.getElementById('optional_param6').style.display = 'none'; document.getElementById('optionalparameters').innerHTML=' '; init_visibility = 0; } + return false; } $(document).ready( function() { @@ -625,26 +629,24 @@ if ($_POST['step2']) {


-


- '; ?> + '; ?> '.$dbNameForm; ?> '.get_lang('ReadWarningBelow').')'; ?>
'.$dbStatsForm.''; + /*echo get_lang('StatDB').' : '.$dbStatsForm.''; if ($installType == 'new') { echo ' ('.get_lang('ReadWarningBelow').')'; } echo '
'; - echo get_lang('UserDB').' : '.$dbUserForm.''; if ($installType == 'new') { echo ' ('.get_lang('ReadWarningBelow').')'; } - echo '
'; + echo '
';*/ } ?> @@ -792,7 +794,7 @@ if ($_POST['step2']) { } } else { - + set_file_folder_permissions(); database_server_connect(); @@ -804,19 +806,16 @@ if ($_POST['step2']) { include 'install_db.inc.php'; include 'install_files.inc.php'; - } - $current_step = 7; - display_after_install_message($installType, $nbr_courses); + } + $current_step = 7; + display_after_install_message($installType, $nbr_courses); } elseif ($_POST['step1'] || $badUpdatePath) { - //STEP 1 : REQUIREMENTS //make sure that proposed path is set, shouldn't be necessary but... if (empty($proposedUpdatePath)) { $proposedUpdatePath = $_POST['updatePath']; } display_requirements($installType, $badUpdatePath, $proposedUpdatePath, $update_from_version_8, $update_from_version_6); - } else { - // This is the start screen. display_language_selection(); } diff --git a/main/install/install.lib.php b/main/install/install.lib.php index 00a5939611..855ed854fe 100755 --- a/main/install/install.lib.php +++ b/main/install/install.lib.php @@ -1660,13 +1660,10 @@ function display_database_settings_form($installType, $dbHostForm, $dbUsernameFo $example_password = get_lang('EG').' '.api_generate_password(); display_database_parameter($installType, get_lang('DBPassword'), 'dbPassForm', $dbPassForm, $example_password); - //database prefix - display_database_parameter($installType, get_lang('DbPrefixForm'), 'dbPrefixForm', $dbPrefixForm, get_lang('DbPrefixCom')); - - //fields for the four standard Chamilo databases + //Fields for the four standard Chamilo databases if ($installType != INSTALL_TYPE_UPDATE) { echo ''; - echo 'show-hide '.get_lang('OptionalParameters', '').''; + echo 'show-hide '.get_lang('OptionalParameters').''; echo ''; } ?> @@ -1688,16 +1685,28 @@ function display_database_settings_form($installType, $dbHostForm, $dbUsernameFo