This commit is contained in:
parent
d862b013d0
commit
b2c275583e
@ -50,7 +50,7 @@ class Doctrine_Hook_WordLike extends Doctrine_Hook_Parser_Complex
|
|||||||
$value = Doctrine_Tokenizer::bracketTrim($value, "'", "'");
|
$value = Doctrine_Tokenizer::bracketTrim($value, "'", "'");
|
||||||
|
|
||||||
$a[] = $alias . '.' . $field . ' LIKE ?';
|
$a[] = $alias . '.' . $field . ' LIKE ?';
|
||||||
$this->params[] = $value . '%';
|
$this->params[] = '%' . $value . '%';
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$e2 = explode(' ',$value);
|
$e2 = explode(' ',$value);
|
||||||
@ -58,9 +58,9 @@ class Doctrine_Hook_WordLike extends Doctrine_Hook_Parser_Complex
|
|||||||
foreach ($e2 as $v) {
|
foreach ($e2 as $v) {
|
||||||
$v = trim($v);
|
$v = trim($v);
|
||||||
$a[] = $alias . '.' . $field . ' LIKE ?';
|
$a[] = $alias . '.' . $field . ' LIKE ?';
|
||||||
$this->params[] = $v . '%';
|
$this->params[] = '%' . $v . '%';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return implode(' OR ', $a);
|
return implode(' OR ', $a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user