Merge branch 'master' into 2.5

Conflicts:
	CONTRIBUTING.md
	lib/Cake/Model/Model.php
	lib/Cake/VERSION.txt
This commit is contained in:
ADmad 2013-10-30 02:34:09 +05:30
commit d9ca148499
73 changed files with 688 additions and 539 deletions

View file

@ -125,22 +125,22 @@ TEXT;
if (!function_exists('sortByKey')) {
/**
* Sorts given $array by key $sortby.
* Sorts given $array by key $sortBy.
*
* @param array $array Array to sort
* @param string $sortby Sort by this key
* @param string $sortBy Sort by this key
* @param string $order Sort order asc/desc (ascending or descending).
* @param integer $type Type of sorting to perform
* @return mixed Sorted array
* @link http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html#sortByKey
*/
function sortByKey(&$array, $sortby, $order = 'asc', $type = SORT_NUMERIC) {
function sortByKey(&$array, $sortBy, $order = 'asc', $type = SORT_NUMERIC) {
if (!is_array($array)) {
return null;
}
foreach ($array as $key => $val) {
$sa[$key] = $val[$sortby];
$sa[$key] = $val[$sortBy];
}
if ($order === 'asc') {
@ -205,7 +205,7 @@ if (!function_exists('h')) {
if (!function_exists('pluginSplit')) {
/**
* Splits a dot syntax plugin name into its plugin and classname.
* Splits a dot syntax plugin name into its plugin and class name.
* If $name does not have a dot, then index 0 will be null.
*
* Commonly used like `list($plugin, $name) = pluginSplit($name);`
@ -213,7 +213,7 @@ if (!function_exists('pluginSplit')) {
* @param string $name The name you want to plugin split.
* @param boolean $dotAppend Set to true if you want the plugin to have a '.' appended to it.
* @param string $plugin Optional default plugin to use if no plugin is found. Defaults to null.
* @return array Array with 2 indexes. 0 => plugin name, 1 => classname
* @return array Array with 2 indexes. 0 => plugin name, 1 => class name
* @link http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html#pluginSplit
*/
function pluginSplit($name, $dotAppend = false, $plugin = null) {