From 00f3aaf61572a1ad334f66053136c5a68247af28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Wed, 23 Feb 2011 01:22:23 -0430 Subject: [PATCH] Fixing some issues in ACL related classes when using database prefixes --- cake/libs/model/db_acl.php | 2 +- cake/tests/cases/libs/model/db_acl.test.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cake/libs/model/db_acl.php b/cake/libs/model/db_acl.php index 4782cfc91..b0cd5d8fc 100644 --- a/cake/libs/model/db_acl.php +++ b/cake/libs/model/db_acl.php @@ -67,7 +67,7 @@ class AclNode extends AppModel { * @return array Node found in database */ public function node($ref = null) { - $db =& ConnectionManager::getDataSource($this->useDbConfig); + $db = $this->getDataSource(); $type = $this->alias; $result = null; diff --git a/cake/tests/cases/libs/model/db_acl.test.php b/cake/tests/cases/libs/model/db_acl.test.php index 5b046717a..07cff6748 100644 --- a/cake/tests/cases/libs/model/db_acl.test.php +++ b/cake/tests/cases/libs/model/db_acl.test.php @@ -363,8 +363,8 @@ class AclNodeTest extends CakeTestCase { * @return void */ function testNodeAliasParenting() { - $Aco = new DbAcoTest(); - $db = ConnectionManager::getDataSource('test'); + $Aco = ClassRegistry::init('DbAcoTest'); + $db = $Aco->getDataSource(); $db->truncate($Aco); $Aco->create(array('model' => null, 'foreign_key' => null, 'parent_id' => null, 'alias' => 'Application'));