install_files.inc.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Install the Chamilo files
  5. * Notice : This script has to be included by install/index.php
  6. *
  7. * The script creates two files:
  8. * - configuration.php, the file that contains very important info for Chamilo
  9. * such as the database names.
  10. * - .htaccess file (in the courses directory) that is optional but improves
  11. * security
  12. *
  13. * @package chamilo.install
  14. */
  15. if (defined('SYSTEM_INSTALLATION')) {
  16. // Write the system config file
  17. //write_system_config_file(api_get_path(CONFIGURATION_PATH).'configuration.php');
  18. write_system_config_file(api_get_path(SYS_PATH_APP).'config/configuration.php');
  19. // Write a distribution file with the config as a backup for the admin
  20. //write_system_config_file(api_get_path(CONFIGURATION_PATH).'configuration.dist.php');
  21. //write_system_config_file(api_get_path(SYS_PATH_APP).'config/configuration.dist.php');
  22. // Write a .htaccess file in the course repository
  23. write_courses_htaccess_file($urlAppendPath);
  24. // Copy distribution files with renaming for being the actual system configuration files.
  25. copy(api_get_path(CONFIGURATION_PATH).'mail.conf.dist.php', api_get_path(SYS_PATH_APP).'config/mail.conf.php');
  26. copy(api_get_path(CONFIGURATION_PATH).'profile.conf.dist.php', api_get_path(SYS_PATH_APP).'config/profile.conf.php');
  27. copy(api_get_path(CONFIGURATION_PATH).'events.conf.dist.php', api_get_path(SYS_PATH_APP).'config/events.conf.php');
  28. copy(api_get_path(CONFIGURATION_PATH).'auth.conf.dist.php', api_get_path(SYS_PATH_APP).'config/auth.conf.php');
  29. copy(api_get_path(CONFIGURATION_PATH).'portfolio.conf.dist.php', api_get_path(SYS_PATH_APP).'config/portfolio.conf.php');
  30. }