mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Adding fix for #2478 corrects issue on php 4
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4921 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
027f7838b5
commit
815b159ab3
1 changed files with 7 additions and 7 deletions
|
@ -62,7 +62,7 @@ class DB_ACL extends AclBase {
|
|||
* @return unknown
|
||||
*/
|
||||
function check($aro, $aco, $action = "*") {
|
||||
$Perms = new Permission();
|
||||
$Permission = new Permission();
|
||||
$Aro = new Aro();
|
||||
$Aco = new Aco();
|
||||
|
||||
|
@ -70,7 +70,7 @@ class DB_ACL extends AclBase {
|
|||
return false;
|
||||
}
|
||||
|
||||
$permKeys = $this->_getAcoKeys($Perms->loadInfo());
|
||||
$permKeys = $this->_getAcoKeys($Permission->loadInfo());
|
||||
$aroPath = $Aro->node($aro);
|
||||
$acoPath = new Set($Aco->node($aco));
|
||||
|
||||
|
@ -93,7 +93,7 @@ class DB_ACL extends AclBase {
|
|||
}
|
||||
|
||||
for($i = count($aroPath) - 1; $i >= 0; $i--) {
|
||||
$perms = $Perms->findAll(
|
||||
$perms = $Permission->findAll(
|
||||
array(
|
||||
'Permission.aro_id' => $aroPath[$i]['Aro']['id'],
|
||||
'Permission.aco_id' => $acoPath->extract('{n}.Aco.id')
|
||||
|
@ -138,9 +138,9 @@ class DB_ACL extends AclBase {
|
|||
* @return boolean
|
||||
*/
|
||||
function allow($aro, $aco, $action = "*", $value = 1) {
|
||||
$Perms = new Permission();
|
||||
$Permission = new Permission();
|
||||
$perms = $this->getAclLink($aro, $aco);
|
||||
$permKeys = $this->_getAcoKeys($Perms->loadInfo());
|
||||
$permKeys = $this->_getAcoKeys($Permission->loadInfo());
|
||||
$save = array();
|
||||
|
||||
if ($perms == false) {
|
||||
|
@ -153,7 +153,7 @@ class DB_ACL extends AclBase {
|
|||
}
|
||||
|
||||
if ($action == "*") {
|
||||
$permKeys = $this->_getAcoKeys($Perms->loadInfo());
|
||||
$permKeys = $this->_getAcoKeys($Permission->loadInfo());
|
||||
|
||||
foreach($permKeys as $key) {
|
||||
$save[$key] = $value;
|
||||
|
@ -173,7 +173,7 @@ class DB_ACL extends AclBase {
|
|||
if ($perms['link'] != null && count($perms['link']) > 0) {
|
||||
$save['id'] = $perms['link'][0]['Permission']['id'];
|
||||
}
|
||||
return $Perms->save(array('Permission' => $save));
|
||||
return $Permission->save(array('Permission' => $save));
|
||||
}
|
||||
/**
|
||||
* Deny
|
||||
|
|
Loading…
Add table
Reference in a new issue