From b2c275583e75c1c3142a1956ce983470f040cb11 Mon Sep 17 00:00:00 2001 From: zYne Date: Wed, 14 Nov 2007 20:43:20 +0000 Subject: [PATCH] --- lib/Doctrine/Hook/WordLike.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/Hook/WordLike.php b/lib/Doctrine/Hook/WordLike.php index 8257011a1..66aa55445 100644 --- a/lib/Doctrine/Hook/WordLike.php +++ b/lib/Doctrine/Hook/WordLike.php @@ -50,7 +50,7 @@ class Doctrine_Hook_WordLike extends Doctrine_Hook_Parser_Complex $value = Doctrine_Tokenizer::bracketTrim($value, "'", "'"); $a[] = $alias . '.' . $field . ' LIKE ?'; - $this->params[] = $value . '%'; + $this->params[] = '%' . $value . '%'; } else { $e2 = explode(' ',$value); @@ -58,9 +58,9 @@ class Doctrine_Hook_WordLike extends Doctrine_Hook_Parser_Complex foreach ($e2 as $v) { $v = trim($v); $a[] = $alias . '.' . $field . ' LIKE ?'; - $this->params[] = $v . '%'; + $this->params[] = '%' . $v . '%'; } } return implode(' OR ', $a); } -} \ No newline at end of file +}