Skip to content
Snippets Groups Projects
Commit 13e52fe3 authored by Steven Wittens's avatar Steven Wittens
Browse files

Fix search indexer link tracking after removal of base-tag.

parent 826396a4
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
...@@ -266,7 +266,7 @@ function search_wipe($sid = NULL, $type = NULL, $reindex = FALSE) { ...@@ -266,7 +266,7 @@ function search_wipe($sid = NULL, $type = NULL, $reindex = FALSE) {
db_query("DELETE FROM {search_dataset} WHERE sid = %d AND type = '%s'", $sid, $type); db_query("DELETE FROM {search_dataset} WHERE sid = %d AND type = '%s'", $sid, $type);
db_query("DELETE FROM {search_index} WHERE fromsid = %d AND fromtype = '%s'", $sid, $type); db_query("DELETE FROM {search_index} WHERE fromsid = %d AND fromtype = '%s'", $sid, $type);
// When re-indexing, keep link references // When re-indexing, keep link references
db_query("DELETE FROM {search_index} WHERE sid = %d AND type = '%s'". ($reindex ? " AND fromsid = 0" ; ''), $sid, $type); db_query("DELETE FROM {search_index} WHERE sid = %d AND type = '%s'". ($reindex ? " AND fromsid = 0" : ''), $sid, $type);
} }
} }
......
...@@ -266,7 +266,7 @@ function search_wipe($sid = NULL, $type = NULL, $reindex = FALSE) { ...@@ -266,7 +266,7 @@ function search_wipe($sid = NULL, $type = NULL, $reindex = FALSE) {
db_query("DELETE FROM {search_dataset} WHERE sid = %d AND type = '%s'", $sid, $type); db_query("DELETE FROM {search_dataset} WHERE sid = %d AND type = '%s'", $sid, $type);
db_query("DELETE FROM {search_index} WHERE fromsid = %d AND fromtype = '%s'", $sid, $type); db_query("DELETE FROM {search_index} WHERE fromsid = %d AND fromtype = '%s'", $sid, $type);
// When re-indexing, keep link references // When re-indexing, keep link references
db_query("DELETE FROM {search_index} WHERE sid = %d AND type = '%s'". ($reindex ? " AND fromsid = 0" ; ''), $sid, $type); db_query("DELETE FROM {search_index} WHERE sid = %d AND type = '%s'". ($reindex ? " AND fromsid = 0" : ''), $sid, $type);
} }
} }
......
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