default prefix value "chamilo_" when installing chamilo see #3736

skala
Julio Montoya 15 years ago
parent c26edc40d8
commit ebe8c6d3b9
  1. 22
      main/install/index.php
  2. 8
      main/install/install.lib.php

@ -209,18 +209,18 @@ if ($installType == 'update' && in_array($my_old_version, $update_from_version_8
if (!isset($_GET['running'])) {
$dbHostForm = 'localhost';
$dbUsernameForm = 'root';
$dbUsernameForm = 'root';
$dbPassForm = '';
$dbPrefixForm = '';
$dbPrefixForm = '';
$dbNameForm = 'chamilo_main';
$dbStatsForm = 'chamilo_main';
$dbScormForm = 'chamilo_main';
$dbStatsForm = 'chamilo_main';
$dbScormForm = 'chamilo_main';
$dbUserForm = 'chamilo_main';
// Extract the path to append to the url if Chamilo is not installed on the web root directory.
$urlAppendPath = api_remove_trailing_slash(api_get_path(REL_PATH));
$urlForm = api_get_path(WEB_PATH);
$pathForm = api_get_path(SYS_PATH);
$urlAppendPath = api_remove_trailing_slash(api_get_path(REL_PATH));
$urlForm = api_get_path(WEB_PATH);
$pathForm = api_get_path(SYS_PATH);
$emailForm = $_SERVER['SERVER_ADMIN'];
$email_parts = explode('@', $emailForm);
@ -536,18 +536,14 @@ if ($encryptPassForm == '1') {
<?php
if ($_POST['step2']) {
//STEP 3 : LICENSE
display_license_agreement();
} elseif ($_POST['step3']) {
//STEP 4 : MYSQL DATABASE SETTINGS
//STEP 4 : MYSQL DATABASE SETTINGS
display_database_settings_form($installType, $dbHostForm, $dbUsernameForm, $dbPassForm, $dbPrefixForm, $enableTrackingForm, $singleDbForm, $dbNameForm, $dbStatsForm, $dbScormForm, $dbUserForm);
} elseif ($_POST['step4']) {
//STEP 5 : CONFIGURATION SETTINGS
//if update, try getting settings from the database...
if ($installType == 'update') {
$db_name = $dbNameForm;

@ -1624,10 +1624,9 @@ function display_database_settings_form($installType, $dbHostForm, $dbUsernameFo
echo '<div class="RequirementContent">';
echo get_lang('DBSettingUpgradeIntro');
echo '</div>';
} else {
} else {
if (empty($dbPrefixForm)) { //make sure there is a default value for db prefix
//$dbPrefixForm = 'chamilo_';
$dbPrefixForm = 'chamilo_';
}
echo '<div class="RequirementHeading"><h2>' . display_step_sequence() .get_lang('DBSetting') . '</h2>';
echo '</div>';
@ -1664,8 +1663,7 @@ function display_database_settings_form($installType, $dbHostForm, $dbUsernameFo
//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 '<tr><td colspan="3">';
echo '<a href="" onclick="javascript: show_hide_option();return false;" id="optionalparameters"><img style="vertical-align:middle;" src="../img/div_show.gif" alt="show-hide" /> '.get_lang('OptionalParameters', '').'</a>';

Loading…
Cancel
Save