You are here

function link_scanner_query_where in Search and Replace Scanner 7

Implements hook_scanner_query_where().

File

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

Code

function link_scanner_query_where(&$or, $table, $field, $where, $binary) {

  // Performed on behalf of link.module.
  if (strpos($field, '_title') != FALSE) {
    $field_url = rtrim($field, '_title') . '_url';
    if (db_field_exists($table, $field_url)) {
      $or
        ->condition('t.' . $field_url, $where, 'REGEXP' . $binary);
    }
  }
}