Adding check for config/inflections.php back to Inflector

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4754 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-04-04 07:42:19 +00:00
parent dcac88825a
commit 4fb14b1506

View file

@ -138,11 +138,16 @@ class Inflector extends Object {
'trilby' => 'trilbys',
'turf' => 'turfs',);
include(CONFIGS.'inflections.php');
$pluralRules = Set::pushDiff($corePluralRules, $pluralRules);
$uninflected = Set::pushDiff($coreUninflectedPlural, $uninflectedPlural);
$irregular = Set::pushDiff($coreIrregularPlural, $irregularPlural);
$pluralRules = $corePluralRules;
$uninflected = $coreUninflectedPlural;
$irregular = $coreIrregularPlural;
if (file_exists(CONFIGS . 'inflections.php')) {
include(CONFIGS.'inflections.php');
$pluralRules = Set::pushDiff($corePluralRules, $pluralRules);
$uninflected = Set::pushDiff($coreUninflectedPlural, $uninflectedPlural);
$irregular = Set::pushDiff($coreIrregularPlural, $irregularPlural);
}
$_this->pluralRules = array('pluralRules' => $pluralRules, 'uninflected' => $uninflected, 'irregular' => $irregular);
$_this->pluralized = array();
}
@ -271,11 +276,16 @@ class Inflector extends Object {
'trilbys' => 'trilby',
'turfs' => 'turf',);
include(CONFIGS.'inflections.php');
$singularRules = Set::pushDiff($coreSingularRules, $singularRules);
$uninflected = Set::pushDiff($coreUninflectedSingular, $uninflectedSingular);
$irregular = Set::pushDiff($coreIrregularSingular, $irregularSingular);
$singularRules = $coreSingularRules;
$uninflected = $coreUninflectedSingular;
$irregular = $coreIrregularSingular;
if (file_exists(CONFIGS . 'inflections.php')) {
include(CONFIGS.'inflections.php');
$singularRules = Set::pushDiff($coreSingularRules, $singularRules);
$uninflected = Set::pushDiff($coreUninflectedSingular, $uninflectedSingular);
$irregular = Set::pushDiff($coreIrregularSingular, $irregularSingular);
}
$_this->singularRules = array('singularRules' => $singularRules, 'uninflected' => $uninflected, 'irregular' => $irregular);
$_this->singularized = array();
}