Completing the round of micro optimization, it was fun while it lasted

This commit is contained in:
José Lorenzo Rodríguez 2010-12-06 23:15:18 -04:30
parent c431ddd22c
commit 6de52f795f
3 changed files with 4 additions and 3 deletions

View file

@ -16,7 +16,7 @@
* @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::uses('Set', 'Core');
App::uses('Set', 'Utility');
/**
* A class that helps wrap Request information and particulars about a single request.

View file

@ -143,7 +143,8 @@ class Dispatcher {
$privateAction = in_array($prefix, $prefixes);
}
}
return $privateAction && ! in_array($request->params['action'], get_class_methods('Controller'));
return $privateAction || in_array($request->params['action'], get_class_methods('Controller'));
}
/**

View file

@ -46,7 +46,7 @@ class Set {
$r = (array)current($args);
while (($arg = next($args)) !== false) {
foreach ((array)$arg as $key => $val) {
if (is_array($val) && isset($r[$key]) && is_array($r[$key])) {
if (!empty($r[$key]) && is_array($r[$key])) {
$r[$key] = Set::merge($r[$key], $val);
} elseif (is_int($key)) {
$r[] = $val;