Merge pull request #403 from rintaun/patch-2

$action in AclShell::_getParams() should default to '*', not NULL
This commit is contained in:
Mark Story 2012-01-12 19:08:42 -08:00
commit 533feea2b1

View file

@ -576,12 +576,9 @@ class AclShell extends AppShell {
if (is_string($aco)) { if (is_string($aco)) {
$aco = $this->parseIdentifier($aco); $aco = $this->parseIdentifier($aco);
} }
$action = null;
if (isset($this->args[2])) {
$action = $this->args[2];
if ($action == '' || $action == 'all') {
$action = '*'; $action = '*';
} if (isset($this->args[2]) && !in_array($this->args[2], array('', 'all'))) {
$action = $this->args[2];
} }
return compact('aro', 'aco', 'action', 'aroName', 'acoName'); return compact('aro', 'aco', 'action', 'aroName', 'acoName');
} }