Minor - Remove calls of specific_fields_manager.lib added in legacy.php

pull/3432/head
Julio Montoya 5 years ago
parent c41dae1e82
commit 139cfe1dcb
  1. 1
      public/main/admin/settings.lib.php
  2. 2
      public/main/admin/specific_fields.php
  3. 1
      public/main/admin/specific_fields_add.php
  4. 1
      public/main/cron/document/index_all_docs.php
  5. 7
      public/main/exercise/exercise.class.php
  6. 5
      public/main/inc/lib/link.lib.php
  7. 2
      public/main/lp/learnpath.class.php
  8. 1
      public/main/lp/lp_edit.php
  9. 1
      public/main/lp/lp_list_search.php
  10. 4
      public/main/lp/openoffice_presentation.class.php
  11. 3
      public/main/lp/openoffice_text.class.php
  12. 1
      public/main/lp/openoffice_text_document.class.php
  13. 1
      public/main/lp/scorm.class.php
  14. 1
      public/main/upload/index.php
  15. 1
      public/main/upload/upload.scorm.php
  16. 2
      public/main/upload/upload_ppt.php
  17. 1
      public/main/upload/upload_word.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(

@ -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();

@ -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;

@ -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) {

@ -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());
}
}

@ -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'));

@ -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,

@ -11,7 +11,6 @@ use ChamiloSession as Session;
*
* @author Yannick Warnier <ywarnier@beeznest.org>
*/
require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
api_protect_course_script();

@ -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);

@ -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;

@ -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
{

@ -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
{

@ -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);

@ -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 '<div class="actions">';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?'.api_get_cidreq().'">'.

@ -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) {

@ -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'));

@ -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) {

Loading…
Cancel
Save