Skip to content

Commit

Permalink
Issue mozfr#644: fix multiword search + fix a call to getRegex()
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalchevrel committed Feb 23, 2016
1 parent 8b54b8c commit 5686f66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/classes/Transvision/Search.php
Expand Up @@ -234,6 +234,6 @@ public function isWholeWords()
*/
public function grep($source_strings)
{
return preg_grep($this->regex, $source_strings);
return preg_grep($this->getRegex(), $source_strings);
}
}
1 change: 1 addition & 0 deletions app/models/mainsearch_strings.php
Expand Up @@ -8,6 +8,7 @@
$locale1_strings = $tmx_source;
$locale2_strings = $tmx_target;
foreach (Utils::uniqueWords($initial_search) as $word) {
$search->setRegexSearchTerms($word);
$locale1_strings = $search->grep($locale1_strings);
$locale2_strings = $search->grep($locale2_strings);
}
Expand Down

0 comments on commit 5686f66

Please sign in to comment.