diff --git a/app/config/bootstrap.php b/app/config/bootstrap.php index da6f91493..924147237 100644 --- a/app/config/bootstrap.php +++ b/app/config/bootstrap.php @@ -1,48 +1,46 @@ array(), irregular' => array(), 'uninflected' => array())); + * Inflector::rule('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array())); * */ -//EOF - -// Inflector::rule('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array())); -// Inflector::rule('singular', array('rules' => array(), irregular' => array(), 'uninflected' => array())); - ?> diff --git a/cake/libs/inflector.php b/cake/libs/inflector.php index 3899c80e3..f5d7a6d9b 100644 --- a/cake/libs/inflector.php +++ b/cake/libs/inflector.php @@ -1,5 +1,4 @@ 'a', '/è|é|ê|ẽ|ë/' => 'e', '/ì|í|î/' => 'i', @@ -451,6 +447,7 @@ class Inflector extends Object { '/\\s+/' => $replacement, sprintf('/^[%s]+|[%s]+$/', $quotedReplacement, $quotedReplacement) => '', ); + $map = array_merge($default, $map); return preg_replace(array_keys($map), array_values($map), $string); } } diff --git a/cake/tests/cases/libs/inflector.test.php b/cake/tests/cases/libs/inflector.test.php index c5e3a95a0..9c7445ad2 100644 --- a/cake/tests/cases/libs/inflector.test.php +++ b/cake/tests/cases/libs/inflector.test.php @@ -1,28 +1,27 @@ - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * - * Licensed under The Open Group Test Suite License - * Redistributions of files must retain the above copyright notice. + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://book.cakephp.org/view/160/Testing * @package cake.tests * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + * @license Open Group Test Suite License (http://www.opensource.org/licenses/opengroup.php) + */ +/** + * Included libraries. + * */ App::import('Core', 'Inflector'); /** @@ -305,4 +304,4 @@ class InflectorTest extends CakeTestCase { unset($this->Inflector); } } -?> +?> \ No newline at end of file