Merge remote-tracking branch 'origin/master' into 2.3

Conflicts:
	lib/Cake/Console/Templates/skel/Config/core.php
This commit is contained in:
Graham Weldon 2012-12-27 22:42:18 +09:00
commit a9293aa385
7 changed files with 33 additions and 8 deletions

13
.editorconfig Normal file
View file

@ -0,0 +1,13 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://editorconfig.org
root = true
[*]
indent_style = tab
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.bat]
end_of_line = crlf

View file

@ -42,7 +42,8 @@
* Options:
*
* - `handler` - callback - The callback to handle errors. You can set this to any callable type,
* including anonymous functions.
* including anonymous functions.
* Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class
* - `level` - int - The level of errors you are interested in capturing.
* - `trace` - boolean - Include stack traces for errors in log files.
*
@ -64,6 +65,7 @@
*
* - `handler` - callback - The callback to handle exceptions. You can set this to any callback type,
* including anonymous functions.
* Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class
* - `renderer` - string - The class responsible for rendering uncaught exceptions. If you choose a custom class you
* should place the file for that class in app/Lib/Error. This class needs to implement a render method.
* - `log` - boolean - Should Exceptions be logged?

View file

@ -42,7 +42,8 @@
* Options:
*
* - `handler` - callback - The callback to handle errors. You can set this to any callable type,
* including anonymous functions.
* including anonymous functions.
* Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class
* - `level` - int - The level of errors you are interested in capturing.
* - `trace` - boolean - Include stack traces for errors in log files.
*
@ -64,6 +65,7 @@
*
* - `handler` - callback - The callback to handle exceptions. You can set this to any callback type,
* including anonymous functions.
* Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class
* - `renderer` - string - The class responsible for rendering uncaught exceptions. If you choose a custom class you
* should place the file for that class in app/Lib/Error. This class needs to implement a render method.
* - `log` - boolean - Should Exceptions be logged?

View file

@ -287,9 +287,14 @@ class Sqlserver extends DboSource {
$fieldAlias = $this->name($alias . '__' . $fields[$i]);
} else {
$build = explode('.', $fields[$i]);
$this->_fieldMappings[$build[0] . '__' . $build[1]] = $fields[$i];
$fieldName = $this->name($build[0] . '.' . $build[1]);
$fieldAlias = $this->name(preg_replace("/^\[(.+)\]$/", "$1", $build[0]) . '__' . $build[1]);
$build[0] = trim($build[0], '[]');
$build[1] = trim($build[1], '[]');
$name = $build[0] . '.' . $build[1];
$alias = $build[0] . '__' . $build[1];
$this->_fieldMappings[$alias] = $name;
$fieldName = $this->name($name);
$fieldAlias = $this->name($alias);
}
if ($model->getColumnType($fields[$i]) == 'datetime') {
$fieldName = "CONVERT(VARCHAR(20), {$fieldName}, 20)";

View file

@ -2660,7 +2660,7 @@ class Model extends Object implements CakeEventListener {
* @param string $type Type of find operation (all / first / count / neighbors / list / threaded)
* @param array $query Option fields (conditions / fields / joins / limit / offset / order / page / group / callbacks)
* @return array Array of records, or Null on failure.
* @link http://book.cakephp.org/2.0/en/models/deleting-data.html#deleteall
* @link http://book.cakephp.org/2.0/en/models/retrieving-your-data.html
*/
public function find($type = 'first', $query = array()) {
$this->findQueryType = $type;

View file

@ -248,7 +248,10 @@ class TreeBehaviorUuidTest extends CakeTestCase {
$this->Tree->bindModel(array('belongsTo' => array('Dummy' =>
array('className' => $modelClass, 'foreignKey' => $parentField, 'conditions' => array('Dummy.id' => null)))), false);
$data = $this->Tree->find('first', array('conditions' => array($modelClass . '.name' => '1. Root')));
$data = $this->Tree->find('first', array(
'conditions' => array($modelClass . '.name' => '1. Root'),
'recursive' => -1
));
$this->Tree->id = $data[$modelClass]['id'];
$direct = $this->Tree->children(null, true, array('name', $leftField, $rightField));

View file

@ -427,7 +427,7 @@ class Debugger {
* @return string
*/
protected static function _highlight($str) {
if (function_exists('hphp_log')) {
if (function_exists('hphp_log') || function_exists('hphp_gettid')) {
return htmlentities($str);
}
$added = false;