Merge branch 'master' into 2.3

Conflicts:
	lib/Cake/VERSION.txt
This commit is contained in:
mark_story 2012-12-07 20:53:10 -05:00
commit 8b0a7ee13d
6 changed files with 18 additions and 8 deletions

View file

@ -8,7 +8,7 @@
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Controller.Component
* @package Cake.Controller.Component.Acl
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
@ -17,7 +17,7 @@
* Access Control List interface.
* Implementing classes are used by AclComponent to perform ACL checks in Cake.
*
* @package Cake.Controller.Component
* @package Cake.Controller.Component.Acl
*/
interface AclInterface {

View file

@ -8,7 +8,7 @@
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Controller.Component
* @package Cake.Controller.Component.Acl
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
@ -32,7 +32,7 @@ App::uses('Hash', 'Utility');
* edit
* }}}
*
* @package Cake.Controller.Component
* @package Cake.Controller.Component.Acl
*/
class DbAcl extends Object implements AclInterface {

View file

@ -8,7 +8,7 @@
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Controller.Component
* @package Cake.Controller.Component.Acl
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
@ -18,7 +18,7 @@ App::uses('AclInterface', 'Controller/Component/Acl');
* IniAcl implements an access control system using an INI file. An example
* of the ini file used can be found in /config/acl.ini.php.
*
* @package Cake.Controller.Component
* @package Cake.Controller.Component.Acl
*/
class IniAcl extends Object implements AclInterface {

View file

@ -2573,7 +2573,11 @@ class DboSource extends DataSource {
$value = $this->value($value, $type);
if (!$virtual && $key !== '?') {
$isKey = (strpos($key, '(') !== false || strpos($key, ')') !== false);
$isKey = (
strpos($key, '(') !== false ||
strpos($key, ')') !== false ||
strpos($key, '|') !== false
);
$key = $isKey ? $this->_quoteFields($key) : $this->name($key);
}

View file

@ -2256,6 +2256,12 @@ class MysqlTest extends CakeTestCase {
$expected = " WHERE `HardCandy`.`name` LIKE 'to be or%' AND `Candy`.`name` LIKE '%not to be%'";
$this->assertEquals($expected, $result);
$result = $this->Dbo->conditions(array(
"Person.name || ' ' || Person.surname ILIKE" => '%mark%'
));
$expected = " WHERE `Person`.`name` || ' ' || `Person`.`surname` ILIKE '%mark%'";
$this->assertEquals($expected, $result);
$result = $this->Dbo->conditions(array('score BETWEEN ? AND ?' => array(90.1, 95.7)));
$expected = " WHERE `score` BETWEEN 90.1 AND 95.7";
$this->assertEquals($expected, $result);

View file

@ -96,7 +96,7 @@ class Hash {
return (array)self::get($data, $path);
}
if (strpos('[', $path) === false) {
if (strpos($path, '[') === false) {
$tokens = explode('.', $path);
} else {
$tokens = String::tokenize($path, '.', '[', ']');