mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
fixes #4910, aclnode loading
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7179 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
dada609521
commit
e9daddddf3
2 changed files with 6 additions and 2 deletions
|
@ -244,7 +244,9 @@ class DbAcl extends AclBase {
|
|||
*/
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
App::import('Model', 'DbAcl');
|
||||
if (!class_exists('AclNode')) {
|
||||
uses('model' . DS . 'db_acl');
|
||||
}
|
||||
$this->Aro =& ClassRegistry::init(array('class' => 'Aro', 'alias' => 'Aro'));
|
||||
$this->Aco =& ClassRegistry::init(array('class' => 'Aco', 'alias' => 'Aco'));
|
||||
}
|
||||
|
|
|
@ -54,7 +54,9 @@ class AclBehavior extends ModelBehavior {
|
|||
}
|
||||
$this->settings[$model->alias] = array_merge(array('type' => 'requester'), (array)$config);
|
||||
$type = $this->__typeMaps[$this->settings[$model->alias]['type']];
|
||||
App::import('Model', 'DbAcl');
|
||||
if (!class_exists('AclNode')) {
|
||||
uses('model' . DS . 'db_acl');
|
||||
}
|
||||
$model->{$type} =& ClassRegistry::init($type);;
|
||||
if (!method_exists($model, 'parentNode')) {
|
||||
trigger_error("Callback parentNode() not defined in {$model->alias}", E_USER_WARNING);
|
||||
|
|
Loading…
Reference in a new issue