Minor - add comment, fix settings name

pull/2487/head
jmontoyaa 8 years ago
parent 2ea713d7fb
commit 52fa5bb1af
  1. 5
      main/inc/lib/api.lib.php
  2. 21
      main/install/index.php
  3. 15
      src/SettingsBundle/Manager/SettingsManager.php

@ -2529,7 +2529,6 @@ function api_get_session_condition(
function api_get_setting($variable)
{
$variable = trim($variable);
switch ($variable) {
case 'header_extra_content':
$filename = api_get_path(SYS_PATH).api_get_home_path().'header_extra_content.txt';
@ -4574,7 +4573,9 @@ function api_get_languages()
$result = Database::query($sql);
$language_list = [];
while ($row = Database::fetch_array($result)) {
$language_list[$row['isocode']] = $row['original_name'];
$language_list['name'][] = $row['original_name'];
$language_list['folder'][] = $row['dokeos_folder'];
$language_list['all'][] = $row;
}
return $language_list;
}

@ -13,7 +13,7 @@ use Chamilo\CoreBundle\Framework\Container;
* Chamilo installation
*
* As seen from the user, the installation proceeds in 6 steps.
* The user is presented with several webpages where he/she has to make choices
* The user is presented with several pages where he/she has to make choices
* and/or fill in data.
*
* The aim is, as always, to have good default settings and suggestions.
@ -42,7 +42,7 @@ require_once '../inc/lib/text.lib.php';
api_check_php_version('../inc/');
// Setting defaults
// Defaults settings
putenv("APP_LOCALE=en");
putenv("APP_URL_APPEND=''");
putenv("APP_ENCRYPT_METHOD='bcrypt'");
@ -52,11 +52,15 @@ putenv("DATABASE_NAME=");
putenv("DATABASE_USER=");
putenv("DATABASE_PASSWORD=");
// Calling Symfony container
$kernel = new Chamilo\Kernel('dev', true);
$kernel->boot();
$container = $kernel->getContainer();
// Set container to use with chamilo legacy code
Container::setContainer($container);
ob_implicit_flush(true);
require_once api_get_path(LIBRARY_PATH).'database.constants.inc.php';
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
require_once api_get_path(LIBRARY_PATH).'text.lib.php';
@ -79,8 +83,7 @@ $urlAppendPath = '';
$urlForm = '';
$pathForm = '';
$emailForm = '';
$dbHostForm = '';
$dbPortForm = '';
$dbHostForm = 'localhost';
$dbUsernameForm = '';
$dbPassForm = '';
$dbNameForm = '';
@ -146,7 +149,7 @@ $language_interface_initial_value = $install_language;
// Character set during the installation, it is always to be 'UTF-8'.
$charset = 'UTF-8';
// Enables the portablity layer and configures PHP for UTF-8
// Enables the portability layer and configures PHP for UTF-8
\Patchwork\Utf8\Bootup::initAll();
// Page encoding initialization.
@ -199,12 +202,6 @@ if (!empty($_POST['old_version'])) {
require_once __DIR__.'/version.php';
// Try to delete old symfony folder (generates conflicts with composer)
$oldSymfonyFolder = '../inc/lib/symfony';
if (is_dir($oldSymfonyFolder)) {
@rmdir($oldSymfonyFolder);
}
// A protection measure for already installed systems.
if (isAlreadyInstalledSystem()) {
// The system has already been installed, so block re-installation.
@ -266,11 +263,9 @@ if ($installType == 'update' && in_array($my_old_version, $update_from_version_8
}
if (!isset($_GET['running'])) {
$dbHostForm = 'localhost';
$dbUsernameForm = 'root';
$dbPassForm = '';
$dbNameForm = 'chamilo';
$dbPortForm = 3306;
// 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));

@ -158,7 +158,7 @@ class SettingsManager implements SettingsManagerInterface
'show_toolshortcuts' => 'Course',
'allow_group_categories' => 'Course',
'server_type' => 'Platform',
'platformLanguage' => 'Languages',
'platformLanguage' => 'language',
'showonline' => 'Platform',
'profile' => 'User',
'default_document_quotum' => 'Course',
@ -235,7 +235,7 @@ class SettingsManager implements SettingsManagerInterface
'allow_social_tool' => 'Tools',
'allow_students_to_browse_courses' => 'Platform',
'show_session_data' => 'Session',
'allow_use_sub_language' => 'Languages',
'allow_use_sub_language' => 'language',
'show_glossary_in_documents' => 'Course',
'allow_terms_conditions' => 'Platform',
'search_enabled' => 'Search',
@ -319,10 +319,10 @@ class SettingsManager implements SettingsManagerInterface
'allow_users_to_change_email_with_no_password' => 'User',
'show_admin_toolbar' => 'display',
'allow_global_chat' => 'Platform',
'languagePriority1' => 'Languages',
'languagePriority2' => 'Languages',
'languagePriority3' => 'Languages',
'languagePriority4' => 'Languages',
'languagePriority1' => 'language',
'languagePriority2' => 'language',
'languagePriority3' => 'language',
'languagePriority4' => 'language',
'login_is_email' => 'Platform',
'courses_default_creation_visibility' => 'Course',
'gradebook_enable_grade_model' => 'Gradebook',
@ -440,8 +440,7 @@ class SettingsManager implements SettingsManagerInterface
'allow_download_documents_by_api_key' => 'Webservices',
'ProfilingFilterAddingUsers' => 'profile',
'donotlistcampus' => 'platform',
'gradebook_show_percentage_in_reports' => 'gradebook',
'gradebook_show_percentage_in_reports' => 'gradebook'
];
return $oldItems;

Loading…
Cancel
Save