diff --git a/cake/libs/controller/components/acl.php b/cake/libs/controller/components/acl.php index ae07c62c9..e17a0dfdd 100644 --- a/cake/libs/controller/components/acl.php +++ b/cake/libs/controller/components/acl.php @@ -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')); } diff --git a/cake/libs/model/behaviors/acl.php b/cake/libs/model/behaviors/acl.php index b73bc50f0..b207f48e1 100644 --- a/cake/libs/model/behaviors/acl.php +++ b/cake/libs/model/behaviors/acl.php @@ -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);