Correcting query order in DB_ACL::check(), fixes #4309

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6654 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2008-04-11 05:48:39 +00:00
parent c7677c2a5e
commit dc5742d28f

View file

@ -300,10 +300,13 @@ class DB_ACL extends AclBase {
for ($i = 0 ; $i < count($aroPath); $i++) {
$permAlias = $this->Aro->Permission->alias;
$perms = $this->Aro->Permission->find('all', array('conditions' => array(
"{$permAlias}.aro_id" => $aroPath[$i][$this->Aro->alias]['id'],
"{$permAlias}.aco_id" => $acoIDs),
null, array($this->Aco->alias . '.lft' => 'desc'), null, null, 0
$perms = $this->Aro->Permission->find('all', array(
'conditions' => array(
"{$permAlias}.aro_id" => $aroPath[$i][$this->Aro->alias]['id'],
"{$permAlias}.aco_id" => $acoIDs
),
'order' => array($this->Aco->alias . '.lft' => 'desc'),
'recursive' => 0
));
if (empty($perms)) {