Fixing typo.

This commit is contained in:
jperras 2009-03-18 01:42:22 -04:00
parent b563393752
commit f811a69c87

View file

@ -236,6 +236,7 @@ class Inflector extends Object {
if (isset($_this->pluralized[$word])) { if (isset($_this->pluralized[$word])) {
return $_this->pluralized[$word]; return $_this->pluralized[$word];
} }
extract($_this->plural); extract($_this->plural);
$uninflected = array_merge($uninflected, $_this->uninflected); $uninflected = array_merge($uninflected, $_this->uninflected);
@ -244,7 +245,7 @@ class Inflector extends Object {
$_this->plural['cacheIrregular'] = '(?:' . join( '|', array_keys($irregular)) . ')'; $_this->plural['cacheIrregular'] = '(?:' . join( '|', array_keys($irregular)) . ')';
} }
if (preg_match('/(.+?)\\b(' . $_this->plural['cacheIrregular'] . ')$/i', $word, $regs)) { if (preg_match('/(.*)\\b(' . $_this->plural['cacheIrregular'] . ')$/i', $word, $regs)) {
$_this->pluralized[$word] = $regs[1] . substr($word, 0, 1) . substr($irregular[strtolower($regs[2])], 1); $_this->pluralized[$word] = $regs[1] . substr($word, 0, 1) . substr($irregular[strtolower($regs[2])], 1);
return $_this->pluralized[$word]; return $_this->pluralized[$word];
} }
@ -287,7 +288,7 @@ class Inflector extends Object {
$_this->singular['cacheIrregular'] = '(?:' . join( '|', array_keys($irregular)) . ')'; $_this->singular['cacheIrregular'] = '(?:' . join( '|', array_keys($irregular)) . ')';
} }
if (preg_match('/(.+?)\\b(' . $_this->singular['cacheUninflected'] . ')$/i', $word, $regs)) { if (preg_match('/(.+?)\\b(' . $_this->singular['cacheIrregular'] . ')$/i', $word, $regs)) {
$_this->singularized[$word] = $regs[1] . substr($word, 0, 1) . substr($irregular[strtolower($regs[2])], 1); $_this->singularized[$word] = $regs[1] . substr($word, 0, 1) . substr($irregular[strtolower($regs[2])], 1);
return $_this->singularized[$word]; return $_this->singularized[$word];
} }