Removing ability to bake $useTable = false models.

This commit is contained in:
mark_story 2009-05-23 23:25:14 -04:00
parent 838af5862e
commit 4fe3c2efe1
2 changed files with 2 additions and 5 deletions

View file

@ -769,7 +769,7 @@ class ModelTask extends Shell {
$tableIsGood = $this->in(__('Do you want to use this table?', true), array('y','n'), 'y');
}
if (strtolower($tableIsGood) == 'n') {
$useTable = $this->in(__('What is the name of the table (enter "null" to use NO table)?', true));
$useTable = $this->in(__('What is the name of the table?', true));
}
return $useTable;
}

View file

@ -27,11 +27,8 @@ class <?php echo $name ?> extends <?php echo $plugin; ?>AppModel {
<?php if ($useDbConfig != 'default'): ?>
var $useDbConfig = '<?php echo $useDbConfig; ?>';
<?php endif;?>
<?php if (($useTable && $useTable !== Inflector::tableize($name)) || $useTable === false):
<?php if ($useTable && $useTable !== Inflector::tableize($name)):
$table = "'$useTable'";
if (!$useTable):
$table = 'false';
endif;
echo "\tvar \$useTable = $table;\n";
endif;
if ($primaryKey !== 'id'): ?>