1 search.extender.inc viewsSearchQuery::condition_replace_string($search, $replace, &$condition)

File

core/modules/search/search.extender.inc, line 561
Search query extender and helper functions.

Class

viewsSearchQuery
Extends the core SearchQuery.

Code

function condition_replace_string($search, $replace, &$condition) {
  if ($condition['field'] instanceof DatabaseCondition) {
    $conditions = &$condition['field']->conditions();
    foreach ($conditions as $key => &$subcondition) {
      if (is_numeric($key)) {
        $this->condition_replace_string($search, $replace, $subcondition);
      }
    }
  }
  else {
    $condition['field'] = str_replace($search, $replace, $condition['field']);
  }
}