From d5b8a6a70bb5a07fd124095c2aacab1a59f2a5f0 Mon Sep 17 00:00:00 2001 From: jwage Date: Tue, 19 Feb 2008 19:51:08 +0000 Subject: [PATCH] Merged r3839 from 0.10 --- lib/Doctrine/Builder/Migration.php | 4 ++-- lib/Doctrine/Export.php | 4 ++-- lib/Doctrine/Export/Schema.php | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/Doctrine/Builder/Migration.php b/lib/Doctrine/Builder/Migration.php index 957d73ce2..3dcced80e 100644 --- a/lib/Doctrine/Builder/Migration.php +++ b/lib/Doctrine/Builder/Migration.php @@ -157,10 +157,10 @@ END; { if ($modelsPath) { $models = Doctrine::loadModels($modelsPath); - } else { - $models = Doctrine::getLoadedModels(); } + $models = Doctrine::getLoadedModels(); + $foreignKeys = array(); foreach ($models as $model) { diff --git a/lib/Doctrine/Export.php b/lib/Doctrine/Export.php index 00e733d40..f31ee19ea 100644 --- a/lib/Doctrine/Export.php +++ b/lib/Doctrine/Export.php @@ -1047,10 +1047,10 @@ class Doctrine_Export extends Doctrine_Connection_Module { if ($directory !== null) { $models = Doctrine::loadModels($directory); - } else { - $models = Doctrine::getLoadedModels(); } + $models = Doctrine::getLoadedModels(); + $this->exportClasses($models); } diff --git a/lib/Doctrine/Export/Schema.php b/lib/Doctrine/Export/Schema.php index 91f8fdb17..ddaeeea10 100644 --- a/lib/Doctrine/Export/Schema.php +++ b/lib/Doctrine/Export/Schema.php @@ -45,11 +45,11 @@ class Doctrine_Export_Schema public function buildSchema($directory = null, $models = array()) { if ($directory) { - $loadedModels = Doctrine::loadModels($directory); - } else { - $loadedModels = Doctrine::getLoadedModels(); + Doctrine::loadModels($directory); } + $loadedModels = Doctrine::getLoadedModels(); + $array = array(); $parent = new ReflectionClass('Doctrine_Record');