type == 'biblio') { // Retrieve the enabled fields. if (!isset($fields)) { $fields = array(); $results = db_query("SELECT f.fiid, b.fid, f.extra_name AS tid, b.name AS node_field_name, b.type FROM {field_indexer_map} f INNER JOIN {biblio_fields} b ON f.name = b.fid WHERE f.namespace = 'biblio' AND f.status = 1"); while ($field = db_fetch_array($results)) { $fields[] = $field; } } // Index the field content. foreach ($fields as $field) { if (isset($node->{$field['node_field_name']}) && trim($node->{$field['node_field_name']}) != '') { // Filter field content. if ($field['type'] == 'textarea') { // TODO: Filter more intelligently; we might want to take into account other tags than those allowed by FILTER_HTML_STRIP. $text = check_markup($node->{$field['node_field_name']}, FILTER_HTML_STRIP, FALSE); } else { $text = check_plain($node->{$field['node_field_name']}); } // Index field content. field_indexer_index($node->nid, $field['fiid'], $text); } } } }