Changeset 198 for trunk/trax/vendor/trax/templates
- Timestamp:
- 04/20/06 10:20:30 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/trax/vendor/trax/templates/scaffolds/generator_templates/controller.php
r117 r198 20 20 21 21 function add() { 22 $this-><?php echo $singluar_model_name ?> = new <?php echo $model_class_name ?>($_REQUEST['<?php echo $singluar_model_name ?>']);22 $this-><?php echo $singluar_model_name ?> = new <?php echo $model_class_name ?>(array_key_exists('<?php echo $singluar_model_name ?>',$_REQUEST) ? $_REQUEST['<?php echo $singluar_model_name ?>'] : null ); 23 23 if($_POST) { 24 24 if($this-><?php echo $singluar_model_name ?>->save($_POST['<?php echo $singluar_model_name ?>'])) {
