You are here

function text_scanner_query_alter in Search and Replace Scanner 7

Implements hook_scanner_query_alter().

File

./scanner.module, line 1422
Search and Replace Scanner - works on all nodes text content.

Code

function text_scanner_query_alter(&$query, $map, $table, $field) {

  // Performed on behalf of text.module.
  $summary_field = rtrim($field, '_value') . '_summary';

  // A 'summary' value exists for this field.
  if (db_field_exists($table, $summary_field)) {
    $query
      ->addField('t', $field_summary, 'summary');
  }
}