updating schema generation

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5969 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2007-11-08 19:06:06 +00:00
parent 4e4fd05034
commit 431f2c2a88
2 changed files with 4 additions and 3 deletions

View file

@ -97,8 +97,6 @@ class SchemaShell extends Shell {
$options = array('models' => false);
}
$content = $this->Schema->read($options);
$snapshot = false;
if (isset($this->args[0]) && $this->args[0] === 'snapshot') {
$snapshot = true;
@ -115,7 +113,9 @@ class SchemaShell extends Shell {
}
}
$content = $this->Schema->read($options);
$content['file'] = 'schema.php';
if($snapshot === true) {
$Folder =& new Folder($this->Schema->path);
$result = $Folder->read();

View file

@ -173,7 +173,8 @@ class CakeSchema extends Object {
if (isset($db->config['prefix'])) {
$prefix = $db->config['prefix'];
}
if (empty($models) && $models !== false) {
if (!is_array($models) && $models !== false) {
$models = Configure::listObjects('model');
}