Skip to content

Commit

Permalink
Fixing some issues in ACL related classes when using database prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Feb 23, 2011
1 parent 8f62d01 commit 00f3aaf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cake/libs/model/db_acl.php
Expand Up @@ -67,7 +67,7 @@ function __construct() {
* @return array Node found in database
*/
public function node($ref = null) {
$db =& ConnectionManager::getDataSource($this->useDbConfig);
$db = $this->getDataSource();
$type = $this->alias;
$result = null;

Expand Down
4 changes: 2 additions & 2 deletions cake/tests/cases/libs/model/db_acl.test.php
Expand Up @@ -363,8 +363,8 @@ function testNodeObjectFind() {
* @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'));
Expand Down

0 comments on commit 00f3aaf

Please sign in to comment.