search_wipe

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/search/search.module, строка 264

Версии
5 – 6
search_wipe($sid = NULL, $type = NULL, $reindex = FALSE)

Wipes a part of or the entire search index.

Параметры

$sid (optional) The SID of the item to wipe. If specified, $type must be passed too.

$type (optional) The type of item to wipe.

▾ 5 функции вызывают search_wipe()

node_delete in modules/node/node.module
Delete a node.
search_admin_settings_validate in modules/search/search.module
Validate callback.
search_index in modules/search/search.module
Update the full-text search index for a particular item.
search_wipe_confirm_submit in modules/search/search.module
Handler for wipe confirmation
system_update_132 in modules/system/system.install

Код

<?php
function search_wipe($sid = NULL, $type = NULL, $reindex = FALSE) {
  if ($type == NULL && $sid == NULL) {
    module_invoke_all('search', 'reset');
  }
  else {
    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);
    // When re-indexing, keep link references
    db_query("DELETE FROM {search_index} WHERE sid = %d AND type = '%s'". ($reindex ? " AND fromsid = 0" : ''), $sid, $type);
  }
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему