Installation improvements.

1.10.x
Julio Montoya 10 years ago
parent 2a30b6962f
commit 7127f6c0ac
  1. 16
      main/install/index.php
  2. 37
      main/install/install.lib.php

@ -78,14 +78,11 @@ $language_interface_initial_value = $install_language;
// Character set during the installation, it is always to be 'UTF-8'.
$charset = 'UTF-8';
// Initialization of the internationalization library.
api_initialize_internationalization();
// Initialization of the default encoding that will be used by the multibyte
// string routines in the internationalization library.
api_set_internationalization_default_encoding($charset);
// Enables the portablity layer and configures PHP for UTF-8
\Patchwork\Utf8\Bootup::initAll();
// Page encoding initialization.
header('Content-Type: text/html; charset='. api_get_system_encoding());
header('Content-Type: text/html; charset='. $charset);
// Setting the error reporting levels.
error_reporting(E_ALL);
@ -564,12 +561,7 @@ if (@$_POST['step2']) {
echo get_lang('AdminPass') . ' : <strong>' . $passForm . '</strong><br /><br />'; /* TODO: Maybe this password should be hidden too? */
}
if (api_is_western_name_order()) {
echo get_lang('AdminFirstName').' : '.$adminFirstName, '<br />', get_lang('AdminLastName').' : '.$adminLastName, '<br />';
} else {
echo get_lang('AdminLastName').' : '.$adminLastName, '<br />', get_lang('AdminFirstName').' : '.$adminFirstName, '<br />';
}
echo get_lang('AdminFirstName').' : '.$adminFirstName, '<br />', get_lang('AdminLastName').' : '.$adminLastName, '<br />';
echo get_lang('AdminEmail').' : '.$emailForm; ?><br />
<?php echo get_lang('AdminPhone').' : '.$adminPhoneForm; ?><br />
<?php echo get_lang('MainLang').' : '.$languageForm; ?><br /><br />

@ -922,6 +922,18 @@ function display_requirements(
<td class="requirements-item">'.api_get_path(SYS_COURSE_PATH).'</td>
<td class="requirements-value">'.check_writable(api_get_path(SYS_COURSE_PATH)).' </td>
</tr>
<tr>
<td class="requirements-item">'.api_get_path(SYS_APP_PATH).'home/</td>
<td class="requirements-value">'.check_writable(api_get_path(SYS_APP_PATH).'home/').'</td>
</tr>
<tr>
<td class="requirements-item">'.api_get_path(SYS_CODE_PATH).'css/</td>
<td class="requirements-value">'.check_writable(api_get_path(SYS_CODE_PATH).'css/', true).' <br />('.get_lang('SuggestionOnlyToEnableCSSUploadFeature').')</td>
</tr>
<tr>
<td class="requirements-item">'.api_get_path(SYS_CODE_PATH).'lang/</td>
<td class="requirements-value">'.check_writable(api_get_path(SYS_CODE_PATH).'lang/', true).' <br />('.get_lang('SuggestionOnlyToEnableSubLanguageFeature').')</td>
</tr>
<tr>
<td class="requirements-item">'.get_lang('CourseTestWasCreated').'</td>
<td class="requirements-value">'.$courseTestLabel.' </td>
@ -934,18 +946,7 @@ function display_requirements(
<td class="requirements-item">'.get_lang('PermissionsForNewFiles').'</td>
<td class="requirements-value">'.$file_perm.' </td>
</tr>
<tr>
<td class="requirements-item">'.api_get_path(SYS_APP_PATH).'home/</td>
<td class="requirements-value">'.check_writable(api_get_path(SYS_APP_PATH).'home/').'</td>
</tr>
<tr>
<td class="requirements-item">'.api_get_path(SYS_CODE_PATH).'css/</td>
<td class="requirements-value">'.check_writable(api_get_path(SYS_CODE_PATH).'css/', true).' ('.get_lang('SuggestionOnlyToEnableCSSUploadFeature').')</td>
</tr>
<tr>
<td class="requirements-item">'.api_get_path(SYS_CODE_PATH).'lang/</td>
<td class="requirements-value">'.check_writable(api_get_path(SYS_CODE_PATH).'lang/', true).' ('.get_lang('SuggestionOnlyToEnableSubLanguageFeature').')</td>
</tr>'.
'.
//'<tr>
// <td class="requirements-item">chamilo/searchdb/</td>
// <td class="requirements-value">'.check_writable('../searchdb/').'</td>
@ -1542,13 +1543,9 @@ function display_configuration_settings_form(
}
// Parameters 3 and 4: administrator's names
if (api_is_western_name_order()) {
display_configuration_parameter($installType, get_lang('AdminFirstName'), 'adminFirstName', $adminFirstName);
display_configuration_parameter($installType, get_lang('AdminLastName'), 'adminLastName', $adminLastName);
} else {
display_configuration_parameter($installType, get_lang('AdminLastName'), 'adminLastName', $adminLastName);
display_configuration_parameter($installType, get_lang('AdminFirstName'), 'adminFirstName', $adminFirstName);
}
display_configuration_parameter($installType, get_lang('AdminFirstName'), 'adminFirstName', $adminFirstName);
display_configuration_parameter($installType, get_lang('AdminLastName'), 'adminLastName', $adminLastName);
//Parameter 3: administrator's email
display_configuration_parameter($installType, get_lang('AdminEmail'), 'emailForm', $emailForm);
@ -1805,7 +1802,7 @@ function check_course_script_interpretation($course_dir, $course_attempt_name, $
if (fwrite($handler, $content)) {
$sock_errno = '';
$sock_errmsg = '';
$url = api_get_path(WEB_COURSE_PATH).$course_attempt_name.'/'.$file;
$url = api_get_path(WEB_PATH).'app/courses/'.$course_attempt_name.'/'.$file;
$parsed_url = parse_url($url);
//$scheme = isset($parsedUrl['scheme']) ? $parsedUrl['scheme'] : ''; //http

Loading…
Cancel
Save