$modulePath = get_module_path($claroLabel); if (file_exists($modulePath)) { $moduleId = register_module($modulePath); if (false !== activate_module($moduleId)) { trigger_error('module (id:' . $moduleId . ' ) not activated ', E_USER_WARNING); } } else { trigger_error('module path not found', E_USER_WARNING); } } // init default right profile init_default_right_profile(); /*** * Generate module conf from definition files. */ $config_code_list = get_config_code_list('module'); if (is_array($config_code_list)) { foreach ($config_code_list as $config_code) { // new config object $config = new Config($config_code); //generate conf list($message, $configToolError) = generate_conf($config, $form_value_list); if ($configToolError) { $configError = true; $messageConfigErrorList[] = $message; } } unset($configToolError); } if ($configError) { $display = DISP_RUN_INSTALL_NOT_COMPLETE;
/** * Return config code list with name and class of the configuration */ function get_config_code_class_list($type = 'all') { $configCodeClassList = array(); $configCodeList = get_config_code_list($type); foreach ($configCodeList as $config_code) { $config = new Config($config_code); if ($config->load()) { $configCodeClassList[$config_code]['name'] = $config->get_conf_name(); $configCodeClassList[$config_code]['class'] = $config->get_conf_class(); } } return $configCodeClassList; }
function fill_table_config_with_md5() { // For each configuration file add a hash code in the new table config_list (new in 1.6) $config_code_list = get_config_code_list(); foreach ($config_code_list as $config_code) { $conf_file = get_conf_file($config_code); // The Hash compute and store is differed after creation table use for this storage // calculate hash of the config file $conf_hash = md5_file($conf_file); save_config_hash_in_db($config_code, $conf_hash); } return true; }
} if (!file_exists(get_path('rootSys') . 'platform/conf/')) { claro_mkdir(get_path('rootSys') . 'platform/conf/', CLARO_FILE_PERMISSIONS, true); } if (!file_exists(get_path('rootSys') . 'tmp/')) { claro_mkdir(get_path('rootSys') . 'tmp/', CLARO_FILE_PERMISSIONS, true); } // Create folder to backup configuration files $backupRepositorySys = get_path('rootSys') . 'platform/bak.' . date('Y-z-B') . '/'; claro_mkdir($backupRepositorySys, CLARO_FILE_PERMISSIONS, true); $output = '<h3>Configuration file</h3>' . "\n"; $output .= '<ol>' . "\n"; /* * Generate configuration file from definition file */ $config_code_list = get_config_code_list(); $config_code_list = array_merge($config_code_list, array('CLANN', 'CLCAL', 'CLFRM', 'CLCHT', 'CLDOC', 'CLDSC', 'CLUSR', 'CLLNP', 'CLQWZ', 'CLWRK', 'CLWIKI')); if (is_array($config_code_list)) { // Build table with current values in configuration files $current_property_list = array(); foreach ($config_code_list as $config_code) { // new config object $config = new ConfigUpgrade($config_code); $config->load(); $this_property_list = $config->get_property_list(); $current_property_list = array_merge($current_property_list, $this_property_list); unset($config); } // Set platform_id if not set in current claroline version (new in 1.6) if (!isset($current_property_list['platform_id'])) { $current_property_list['platform_id'] = $platform_id;