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:
gwoo 2008-06-13 16:40:45 +00:00
parent dada609521
commit e9daddddf3
2 changed files with 6 additions and 2 deletions

View file

@ -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'));
}

View file

@ -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);