Fixing some issues in ACL related classes when using database prefixes

This commit is contained in:
José Lorenzo Rodríguez 2011-02-23 01:22:23 -04:30
parent 8f62d01701
commit 00f3aaf615
2 changed files with 3 additions and 3 deletions

View file

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

View file

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