function fuzzysearch_reindex in Fuzzy Search 6
External API function that allows modules to flag a node for reindexing.
Parameters
$nid: Nid of the node to be reindexed.
$module: Name of the module flagging the node.
3 calls to fuzzysearch_reindex()
- fuzzysearch_admin_form_submit in ./
fuzzysearch.admin.inc - fuzzysearch_comment in ./
fuzzysearch.module - Implementation of hook_comment().
- fuzzysearch_nodeapi in ./
fuzzysearch.module - Implementation of hook_nodeapi().
File
- ./
fuzzysearch.module, line 227 - Module file for fuzzysearch module.
Code
function fuzzysearch_reindex($nid, $module) {
$query = db_query("SELECT * FROM {fuzzysearch_index_queue} WHERE nid = %d", $nid);
if (!db_result($query)) {
db_query("INSERT INTO {fuzzysearch_index_queue} (nid, module, timestamp) VALUES (%d, '%s', %d)", $nid, $module, time());
}
}