mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
bug 3056: quick search - english inflections improvements
git-svn-id: http://piwigo.org/svn/trunk@28196 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user