diff --git a/public/main/admin/settings.lib.php b/public/main/admin/settings.lib.php index 189fab68c2..f18524f127 100644 --- a/public/main/admin/settings.lib.php +++ b/public/main/admin/settings.lib.php @@ -747,7 +747,6 @@ function handleSearch() { global $SettingsStored, $_configuration; - require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; $search_enabled = api_get_setting('search_enabled'); $form = new FormValidator( diff --git a/public/main/admin/specific_fields.php b/public/main/admin/specific_fields.php index b822972bba..120bd72bf8 100644 --- a/public/main/admin/specific_fields.php +++ b/public/main/admin/specific_fields.php @@ -18,8 +18,6 @@ $interbreadcrumb[] = ['url' => 'settings.php?category=Search', 'name' => get_lan $libpath = api_get_path(LIBRARY_PATH); -include_once $libpath.'specific_fields_manager.lib.php'; - // Create an add-field box $form = new FormValidator('add_field', 'post', '', '', null, false); $renderer = &$form->defaultRenderer(); diff --git a/public/main/admin/specific_fields_add.php b/public/main/admin/specific_fields_add.php index 6e13a10093..1f0639d925 100644 --- a/public/main/admin/specific_fields_add.php +++ b/public/main/admin/specific_fields_add.php @@ -10,7 +10,6 @@ $cidReset = true; require_once __DIR__.'/../inc/global.inc.php'; $libpath = api_get_path(LIBRARY_PATH); -require_once $libpath.'specific_fields_manager.lib.php'; // section for the tabs $this_section = SECTION_PLATFORM_ADMIN; diff --git a/public/main/cron/document/index_all_docs.php b/public/main/cron/document/index_all_docs.php index 8bbf96a720..93b65b5e1f 100644 --- a/public/main/cron/document/index_all_docs.php +++ b/public/main/cron/document/index_all_docs.php @@ -36,7 +36,6 @@ $allowed_extensions = [ $courses_list = CourseManager::get_courses_list(); // Simulating empty specific fields (this is necessary for indexing) -require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; $specific_fields = get_specific_field_list(); $specific_fields_values = []; foreach ($specific_fields as $sf) { diff --git a/public/main/exercise/exercise.class.php b/public/main/exercise/exercise.class.php index 19e673c6d6..6c0a2d3cf1 100644 --- a/public/main/exercise/exercise.class.php +++ b/public/main/exercise/exercise.class.php @@ -2354,7 +2354,6 @@ class Exercise $defaults = []; if ('true' === api_get_setting('search_enabled')) { - require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; $form->addElement('checkbox', 'index_document', '', get_lang('Index document text?')); $form->addSelectLanguage('language', get_lang('Document language for indexation')); $specific_fields = get_specific_field_list(); @@ -2729,9 +2728,6 @@ class Exercise return; } $course_id = api_get_course_id(); - - require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; - $specific_fields = get_specific_field_list(); $ic_slide = new IndexableChunk(); @@ -2796,8 +2792,6 @@ class Exercise $res = Database::query($sql); if (Database::num_rows($res) > 0) { - require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; - $se_ref = Database::fetch_array($res); $specific_fields = get_specific_field_list(); $ic_slide = new IndexableChunk(); @@ -2897,7 +2891,6 @@ class Exercise Database::query($sql); // remove terms from db - require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; delete_all_values_for_item($course_id, TOOL_QUIZ, $this->getId()); } } diff --git a/public/main/inc/lib/link.lib.php b/public/main/inc/lib/link.lib.php index a79a8f2243..7dbee55c83 100644 --- a/public/main/inc/lib/link.lib.php +++ b/public/main/inc/lib/link.lib.php @@ -154,7 +154,6 @@ class Link extends Model if (('true' === api_get_setting('search_enabled')) && $link_id && extension_loaded('xapian') ) { - require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; $courseCode = $course_info['code']; $specific_fields = get_specific_field_list(); $ic_slide = new IndexableChunk(); @@ -446,7 +445,6 @@ class Link extends Model Database:: query($sql); // Remove terms from db. - require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; delete_all_values_for_item($course_id, TOOL_DOCUMENT, $link_id); } } @@ -582,8 +580,6 @@ class Link extends Model $res = Database:: query($sql); if (Database:: num_rows($res) > 0) { - require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; - $se_ref = Database:: fetch_array($res); $specific_fields = get_specific_field_list(); $ic_slide = new IndexableChunk(); @@ -1702,7 +1698,6 @@ Do you really want to delete this category and its links ?')."')) return false;\ ]; if ('true' === api_get_setting('search_enabled')) { - require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; $specific_fields = get_specific_field_list(); $form->addCheckBox('index_document', get_lang('Index link title and description?s'), get_lang('Yes')); diff --git a/public/main/lp/learnpath.class.php b/public/main/lp/learnpath.class.php index 944240c026..b432bbcd4f 100644 --- a/public/main/lp/learnpath.class.php +++ b/public/main/lp/learnpath.class.php @@ -1039,7 +1039,6 @@ class learnpath } if ('true' === api_get_setting('search_enabled')) { - require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; delete_all_values_for_item($this->cc, TOOL_LEARNPATH, $this->lp_id); } } @@ -1448,7 +1447,6 @@ class learnpath */ public function get_common_index_terms_by_prefix($prefix) { - require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; $terms = get_specific_field_values_list_by_prefix( $prefix, $this->cc, diff --git a/public/main/lp/lp_edit.php b/public/main/lp/lp_edit.php index b307549fe3..4a53191ed6 100644 --- a/public/main/lp/lp_edit.php +++ b/public/main/lp/lp_edit.php @@ -11,7 +11,6 @@ use ChamiloSession as Session; * * @author Yannick Warnier */ -require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; api_protect_course_script(); diff --git a/public/main/lp/lp_list_search.php b/public/main/lp/lp_list_search.php index 109bf5f745..9b100e75e8 100644 --- a/public/main/lp/lp_list_search.php +++ b/public/main/lp/lp_list_search.php @@ -11,7 +11,6 @@ */ require api_get_path(LIBRARY_PATH).'search/search_widget.php'; require api_get_path(LIBRARY_PATH).'search/ChamiloQuery.php'; -require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; Event::event_access_tool(TOOL_SEARCH); diff --git a/public/main/lp/openoffice_presentation.class.php b/public/main/lp/openoffice_presentation.class.php index 47c2d72975..0642df28ac 100644 --- a/public/main/lp/openoffice_presentation.class.php +++ b/public/main/lp/openoffice_presentation.class.php @@ -15,10 +15,6 @@ */ require_once 'openoffice_document.class.php'; -if ('true' == api_get_setting('search_enabled')) { - require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; -} - class OpenofficePresentation extends OpenofficeDocument { public $take_slide_name; diff --git a/public/main/lp/openoffice_text.class.php b/public/main/lp/openoffice_text.class.php index 42a13e1ffc..1b3cb8fa62 100644 --- a/public/main/lp/openoffice_text.class.php +++ b/public/main/lp/openoffice_text.class.php @@ -14,9 +14,6 @@ * Defines the "OpenofficeText" child of class "learnpath". */ require_once 'openoffice_document.class.php'; -if ('true' == api_get_setting('search_enabled')) { - require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; -} class OpenofficeText extends OpenofficeDocument { diff --git a/public/main/lp/openoffice_text_document.class.php b/public/main/lp/openoffice_text_document.class.php index edadff4067..1c56668743 100644 --- a/public/main/lp/openoffice_text_document.class.php +++ b/public/main/lp/openoffice_text_document.class.php @@ -13,7 +13,6 @@ * Defines the "OpenOfficeTextDocument" child of class "learnpath". */ require_once 'openoffice_document.class.php'; -require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; class OpenOfficeTextDocument extends OpenofficeDocument { diff --git a/public/main/lp/scorm.class.php b/public/main/lp/scorm.class.php index 92e5c79121..7a1af7018b 100644 --- a/public/main/lp/scorm.class.php +++ b/public/main/lp/scorm.class.php @@ -469,7 +469,6 @@ class scorm extends learnpath // Code for indexing, now only index specific fields like terms and the title. if (!empty($_POST['index_document'])) { - require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; $di = new ChamiloIndexer(); isset($_POST['language']) ? $lang = Database::escape_string($_POST['language']) : $lang = 'english'; $di->connectDb(null, null, $lang); diff --git a/public/main/upload/index.php b/public/main/upload/index.php index 5fb67e0951..3a758c23bd 100644 --- a/public/main/upload/index.php +++ b/public/main/upload/index.php @@ -93,7 +93,6 @@ $interbreadcrumb[] = [ Display::display_header($nameTools, 'Path'); require_once '../lp/content_makers.inc.php'; -require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; echo '
'; echo ''. diff --git a/public/main/upload/upload.scorm.php b/public/main/upload/upload.scorm.php index 808c90f1ff..46e1db232e 100644 --- a/public/main/upload/upload.scorm.php +++ b/public/main/upload/upload.scorm.php @@ -14,7 +14,6 @@ require_once '../lp/lp_upload.php'; chdir($cwdir); if ('true' === api_get_setting('search_enabled')) { - require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; $specific_fields = get_specific_field_list(); foreach ($specific_fields as $specific_field) { diff --git a/public/main/upload/upload_ppt.php b/public/main/upload/upload_ppt.php index 9e9faab500..df89ffd629 100644 --- a/public/main/upload/upload_ppt.php +++ b/public/main/upload/upload_ppt.php @@ -22,7 +22,6 @@ if (isset($_POST['convert'])) { require_once api_get_path(SYS_CODE_PATH).'lp/lp_upload.php'; if (isset($o_ppt) && 0 != $first_item_id) { if ('true' == api_get_setting('search_enabled')) { - require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; $specific_fields = get_specific_field_list(); foreach ($specific_fields as $specific_field) { $values = explode(',', trim($_POST[$specific_field['code']])); @@ -86,7 +85,6 @@ $form->addElement('checkbox', 'take_slide_name', '', get_lang('Use the slides na $options = ChamiloApi::getDocumentConversionSizes(); $form->addElement('select', 'slide_size', get_lang('Size of the slides'), $options); if ('true' === api_get_setting('search_enabled')) { - require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; $specific_fields = get_specific_field_list(); $form->addElement('checkbox', 'index_document', '', get_lang('Index document text?ument')); $form->addSelectLanguage('language', get_lang('SearchFeatureDocumentumentLanguage')); diff --git a/public/main/upload/upload_word.php b/public/main/upload/upload_word.php index 1ac1ec62ac..b0b29c49ec 100644 --- a/public/main/upload/upload_word.php +++ b/public/main/upload/upload_word.php @@ -37,7 +37,6 @@ if (isset($_POST['convert'])) { if (isset($o_doc) && 0 != $first_item_id) { // Search-related section if ('true' == api_get_setting('search_enabled')) { - require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; $specific_fields = get_specific_field_list(); foreach ($specific_fields as $specific_field) {