From 0bbf61ce3db3d7f0657083f6530426c269aa4c10 Mon Sep 17 00:00:00 2001 From: mark_story Date: Fri, 10 Aug 2012 21:48:22 -0400 Subject: [PATCH] Add removed getDataSource() call. This fixes an issue where the wrong datasource could potentially be used for getting the full table name. --- lib/Cake/Model/CakeSchema.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Cake/Model/CakeSchema.php b/lib/Cake/Model/CakeSchema.php index 0d15d9ae7..75339e608 100644 --- a/lib/Cake/Model/CakeSchema.php +++ b/lib/Cake/Model/CakeSchema.php @@ -257,6 +257,7 @@ class CakeSchema extends Object { if (!is_object($Object) || $Object->useTable === false) { continue; } + $db = $Object->getDataSource(); $fulltable = $table = $db->fullTableName($Object, false, false); if ($prefix && strpos($table, $prefix) !== 0) {