Skip to content
Snippets Groups Projects
Commit d179e77d authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2160895 by jhodgdon, InternetDevels: Remove $reindex param in search_reindex().

parent 62cd6a85
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -177,13 +177,11 @@ function search_menu() { ...@@ -177,13 +177,11 @@ function search_menu() {
* @param $type * @param $type
* (optional) The plugin ID or other machine-readable type for the item to * (optional) The plugin ID or other machine-readable type for the item to
* remove from the search index. * remove from the search index.
* @param $reindex
* (optional) Boolean to specify whether reindexing happens.
* @param $langcode * @param $langcode
* (optional) Language code for the operation. If not provided, all * (optional) Language code for the operation. If not provided, all
* index records for the $sid and $type will be deleted. * index records for the $sid and $type will be deleted.
*/ */
function search_reindex($sid = NULL, $type = NULL, $reindex = FALSE, $langcode = NULL) { function search_reindex($sid = NULL, $type = NULL, $langcode = NULL) {
if ($type == NULL && $sid == NULL) { if ($type == NULL && $sid == NULL) {
/** @var $search_page_repository \Drupal\search\SearchPageRepositoryInterface */ /** @var $search_page_repository \Drupal\search\SearchPageRepositoryInterface */
$search_page_repository = \Drupal::service('search.search_page_repository'); $search_page_repository = \Drupal::service('search.search_page_repository');
...@@ -524,7 +522,7 @@ function search_index($sid, $type, $text, $langcode) { ...@@ -524,7 +522,7 @@ function search_index($sid, $type, $text, $langcode) {
$tag = !$tag; $tag = !$tag;
} }
search_reindex($sid, $type, TRUE, $langcode); search_reindex($sid, $type, $langcode);
// Insert cleaned up data into dataset // Insert cleaned up data into dataset
db_insert('search_dataset') db_insert('search_dataset')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment