Permalink
Browse files

Removing ability to bake $useTable = false models.

  • Loading branch information...
1 parent 838af58 commit 4fe3c2efe1f2216f93c570b3d6f187a1653f394f @markstory markstory committed May 24, 2009
Showing with 2 additions and 5 deletions.
  1. +1 −1 cake/console/libs/tasks/model.php
  2. +1 −4 cake/console/libs/templates/objects/model.ctp
@@ -769,7 +769,7 @@ function getTable($modelName, $useDbConfig = null) {
$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;
}
@@ -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'): ?>

0 comments on commit 4fe3c2e

Please sign in to comment.