mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-12 20:49:50 +00:00
Removing ability to bake $useTable = false models.
This commit is contained in:
parent
838af5862e
commit
4fe3c2efe1
2 changed files with 2 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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'): ?>
|
||||
|
|
Loading…
Add table
Reference in a new issue