aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2014-04-15 20:22:10 +0000
committerrvelices <rv-github@modusoptimus.com>2014-04-15 20:22:10 +0000
commitac316cee7109652edf2edeb715b8012a654433d2 (patch)
treefdc630195bd5782a0a157dcadabcc80ca6b85576 /include
parentf010cc86b837f68cbdc99d788e15e29aef3c1433 (diff)
bug 3056: quick search - english inflections improvements
git-svn-id: http://piwigo.org/svn/trunk@28196 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/inflectors/en.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/inflectors/en.php b/include/inflectors/en.php
index c9663a3e5..2ce43fb22 100644
--- a/include/inflectors/en.php
+++ b/include/inflectors/en.php
@@ -96,12 +96,13 @@ class Inflector_en
$this->er2ing = array_reverse(array(
'/ers?$/' => 'ing',
- '/((be|riv)ers?)$/' => '\1'
+ '/(be|draw)ers?$/' => '\0'
));
$this->ing2er = array_reverse(array(
'/ing$/' => 'er',
- '/(being)$/' => '\1'
+ '/(th|r|hous)ing$/' => '\0',
+ '/(be|draw)ing$/' => '\0'
));
}
@@ -138,8 +139,12 @@ class Inflector_en
$rc = preg_replace($rule.'i', $replacement, $word, -1, $count);
if ($count)
{
- $res[] = $rc;
- return $rc;
+ if ($rc !== $word)
+ {
+ $res[] = $rc;
+ return $rc;
+ }
+ break;
}
}
return false;