From bed5453be0271f0b0fe925ccd3cd6721c185e088 Mon Sep 17 00:00:00 2001 From: euromark Date: Wed, 8 Aug 2012 14:44:38 +0200 Subject: [PATCH] correcting order --- lib/Cake/Model/CakeSchema.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Model/CakeSchema.php b/lib/Cake/Model/CakeSchema.php index f72316a03..0d15d9ae7 100644 --- a/lib/Cake/Model/CakeSchema.php +++ b/lib/Cake/Model/CakeSchema.php @@ -254,11 +254,12 @@ class CakeSchema extends Object { continue; } - $fulltable = $table = $db->fullTableName($Object, false, false); - if ($prefix && strpos($table, $prefix) !== 0) { + if (!is_object($Object) || $Object->useTable === false) { continue; } - if (!is_object($Object) || $Object->useTable === false) { + + $fulltable = $table = $db->fullTableName($Object, false, false); + if ($prefix && strpos($table, $prefix) !== 0) { continue; } if (!in_array($fulltable, $currentTables)) {