mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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:
parent
dcac88825a
commit
4fb14b1506
1 changed files with 18 additions and 8 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue