Merge master in 1.3

This commit is contained in:
gwoo 2009-03-19 14:10:13 -07:00
parent 6cb8b3d286
commit 643651fe56
250 changed files with 2589 additions and 2019 deletions

View file

@ -205,11 +205,11 @@ class ModelBehavior extends Object {
* @subpackage cake.cake.libs.model
*/
class BehaviorCollection extends Object {
/**
* Stores a reference to the attached name
*
* @var object
* @var string
* @access public
*/
var $modelName = null;
/**

View file

@ -1,9 +1,9 @@
<?php
/* SVN FILE: $Id$ */
/**
* Short description for file.
* Datasource connection manager
*
* Long description for file
* Provides an interface for loading and enumerating connections defined in app/config/database.php
*
* PHP versions 4 and 5
*
@ -39,7 +39,7 @@ class ConnectionManager extends Object {
/**
* Holds a loaded instance of the Connections object
*
* @var object
* @var DATABASE_CONFIG
* @access public
*/
var $config = null;
@ -85,7 +85,7 @@ class ConnectionManager extends Object {
/**
* Gets a reference to a DataSource object
*
* @param string $name The name of the DataSource, as defined in app/config/connections
* @param string $name The name of the DataSource, as defined in app/config/database.php
* @return object Instance
* @access public
* @static
@ -145,8 +145,9 @@ class ConnectionManager extends Object {
/**
* Loads the DataSource class for the given connection name
*
* @param mixed $connName A string name of the connection, as defined in Connections config,
* or an array containing the file and class name of the object.
* @param mixed $connName A string name of the connection, as defined in app/config/database.php,
* or an array containing the filename (without extension) and class name of the object,
* to be found in app/models/datasources/ or cake/libs/model/datasources/.
* @return boolean True on success, null on failure or false if the class is already loaded
* @access public
* @static
@ -259,4 +260,4 @@ class ConnectionManager extends Object {
}
}
}
?>
?>

View file

@ -221,7 +221,7 @@ class Model extends Overloadable {
/**
* Holds the Behavior objects currently bound to this model.
*
* @var object
* @var BehaviorCollection
* @access public
*/
var $Behaviors = null;
@ -2343,9 +2343,15 @@ class Model extends Overloadable {
$this->exists();
$_validate = $this->validate;
if (array_key_exists('fieldList', $options) && is_array($options['fieldList']) && !empty($options['fieldList'])) {
$whitelist = $this->whitelist;
if (array_key_exists('fieldList', $options)) {
$whitelist = $options['fieldList'];
}
if (!empty($whitelist)) {
$validate = array();
foreach ($options['fieldList'] as $f) {
foreach ((array)$whitelist as $f) {
if (!empty($this->validate[$f])) {
$validate[$f] = $this->validate[$f];
}