diff --git a/search/documents/physical_htm.php b/search/documents/physical_htm.php index ef0a8a0e48a..76085111580 100644 --- a/search/documents/physical_htm.php +++ b/search/documents/physical_htm.php @@ -58,7 +58,7 @@ function get_text_for_indexing_htm(&$resource, $directfile = ''){ */ if (!empty($CFG->block_search_limit_index_body)){ - $text = shorten($text, $CFG->block_search_limit_index_body); + $text = shorten_text($text, $CFG->block_search_limit_index_body); } return $text; } diff --git a/search/documents/physical_ppt.php b/search/documents/physical_ppt.php index 7dd14e6c8b4..f86bbf5b017 100644 --- a/search/documents/physical_ppt.php +++ b/search/documents/physical_ppt.php @@ -87,7 +87,7 @@ function get_text_for_indexing_ppt(&$resource, $directfile = ''){ // fclose($logppt); if (!empty($CFG->block_search_limit_index_body)){ - $indextext = shorten($text, $CFG->block_search_limit_index_body); + $indextext = shorten_text($text, $CFG->block_search_limit_index_body); } $indextext = mb_convert_encoding($indextext, 'UTF-8', 'auto'); diff --git a/search/documents/physical_txt.php b/search/documents/physical_txt.php index 1cdf8eb1b29..6d69c838bce 100644 --- a/search/documents/physical_txt.php +++ b/search/documents/physical_txt.php @@ -33,7 +33,7 @@ function get_text_for_indexing_txt(&$resource, $directfile = ''){ } if (!empty($CFG->block_search_limit_index_body)){ - $text = shorten($text, $CFG->block_search_limit_index_body); + $text = shorten_text($text, $CFG->block_search_limit_index_body); } return $text; } diff --git a/search/documents/physical_xml.php b/search/documents/physical_xml.php index 58dbb4bc412..6347ae01e86 100644 --- a/search/documents/physical_xml.php +++ b/search/documents/physical_xml.php @@ -36,7 +36,7 @@ function get_text_for_indexing_xml(&$resource, $directfile = ''){ $text = preg_replace("/<[^>]*>/", ' ', $text); if (!empty($CFG->block_search_limit_index_body)){ - $text = shorten($text, $CFG->block_search_limit_index_body); + $text = shorten_text($text, $CFG->block_search_limit_index_body); } return $text; }