Bläddra i källkod

Removing (commenting in fact ) add_course.conf.php and course_info.conf.php calls see #5581

Julio Montoya 12 år sedan
förälder
incheckning
acf6e8b365

+ 1 - 1
main/admin/session_import.php

@@ -14,7 +14,7 @@ $this_section = SECTION_PLATFORM_ADMIN;
 api_protect_admin_script(true);
 
 $form_sent = 0;
-$error_message = ''; // Avoid conflict with the global variable $error_msg (array type) in add_course.conf.php.
+$error_message = '';
 if (isset($_GET['action']) && $_GET['action'] == 'show_message') {
     $error_message = Security::remove_XSS($_GET['message']);
 }

+ 1 - 1
main/admin/session_list.php

@@ -34,7 +34,7 @@ $interbreadcrumb[] = array("url" => "index.php","name" => get_lang('PlatformAdmi
 $tool_name = get_lang('SessionList');
 Display::display_header($tool_name);
 
-$error_message = ''; // Avoid conflict with the global variable $error_msg (array type) in add_course.conf.php.
+$error_message = '';
 if (isset($_GET['action']) && $_GET['action'] == 'show_message') {
     $error_message = Security::remove_XSS($_GET['message']);
 }

+ 1 - 1
main/admin/session_user_import.php

@@ -14,7 +14,7 @@ $this_section = SECTION_PLATFORM_ADMIN;
 api_protect_admin_script(true);
 
 $form_sent = 0;
-$error_message = ''; // Avoid conflict with the global variable $error_msg (array type) in add_course.conf.php.
+$error_message = '';
 if (isset($_GET['action']) && $_GET['action'] == 'show_message') {
     $error_message = Security::remove_XSS($_GET['message']);
 }

+ 8 - 6
main/inc/global.inc.php

@@ -105,21 +105,23 @@ ini_set('auto_detect_line_endings', '1');
 //Include the libraries that are necessary everywhere
 //require_once dirname(__FILE__).'/autoload.inc.php';
 
-/* 
- * Using composer see #5523
- */
-
 //Fixes Htmlpurifier autoloader issue with composer
 define('HTMLPURIFIER_PREFIX', $lib_path.'htmlpurifier/library'); 
 
+//mpdf constants
 define("_MPDF_TEMP_PATH", api_get_path(SYS_ARCHIVE_PATH));
 define('_MPDF_PATH', api_get_path(LIBRARY_PATH).'mpdf/');
 
+//Composer autoloader
 require_once __DIR__.'../../../vendor/autoload.php';
 
+//Database constants
 require_once $lib_path.'database.constants.inc.php';
-require_once api_get_path(CONFIGURATION_PATH).'add_course.conf.php';
-require_once api_get_path(CONFIGURATION_PATH).'course_info.conf.php';
+
+//Removing support for this files:
+//require_once api_get_path(CONFIGURATION_PATH).'add_course.conf.php';
+//require_once api_get_path(CONFIGURATION_PATH).'course_info.conf.php';
+
 require_once $lib_path.'mail.lib.inc.php';
 require_once $lib_path.'fileManage.lib.php';
 require_once $lib_path.'text.lib.php';

+ 2 - 2
main/install/install_files.inc.php

@@ -26,8 +26,8 @@ if (defined('SYSTEM_INSTALLATION')) {
 	write_courses_htaccess_file($urlAppendPath);
 
 	// Copy distribution files with renaming for being the actual system configuration files.
-	copy(api_get_path(CONFIGURATION_PATH).'add_course.conf.dist.php', api_get_path(CONFIGURATION_PATH).'add_course.conf.php');
-	copy(api_get_path(CONFIGURATION_PATH).'course_info.conf.dist.php', api_get_path(CONFIGURATION_PATH).'course_info.conf.php');
+	//copy(api_get_path(CONFIGURATION_PATH).'add_course.conf.dist.php', api_get_path(CONFIGURATION_PATH).'add_course.conf.php');
+	//copy(api_get_path(CONFIGURATION_PATH).'course_info.conf.dist.php', api_get_path(CONFIGURATION_PATH).'course_info.conf.php');
 	copy(api_get_path(CONFIGURATION_PATH).'mail.conf.dist.php', api_get_path(CONFIGURATION_PATH).'mail.conf.php');
 	copy(api_get_path(CONFIGURATION_PATH).'profile.conf.dist.php', api_get_path(CONFIGURATION_PATH).'profile.conf.php');
     copy(api_get_path(CONFIGURATION_PATH).'events.conf.dist.php', api_get_path(CONFIGURATION_PATH).'events.conf.php');