mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Updating default bake templates to exclude primary key input for all actions containing 'add'
Fixes #319
This commit is contained in:
parent
d1066bfeaf
commit
f038cb8ffb
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@
|
|||
<?php
|
||||
echo "\t<?php\n";
|
||||
foreach ($fields as $field) {
|
||||
if ($action == 'add' && $field == $primaryKey) {
|
||||
if (substr($action, 'add') !== false && $field == $primaryKey) {
|
||||
continue;
|
||||
} elseif (!in_array($field, array('created', 'modified', 'updated'))) {
|
||||
echo "\t\techo \$this->Form->input('{$field}');\n";
|
||||
|
|
Loading…
Add table
Reference in a new issue