Changeset 292
- Timestamp:
- 08/07/07 09:44:45 (5 years ago)
- Files:
-
- 1 modified
-
trunk/trax/vendor/trax/action_controller.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/trax/vendor/trax/action_controller.php
r284 r292 499 499 } 500 500 //error_log('action='.$this->action); 501 501 502 // FIXME: RoR uses :name as a keyword parameter, id 502 503 // is not treated as a special case. 503 504 // Do we want to do the same? 504 if(@in_array(":id",$route_path) 505 if(is_array($route_params) 506 && array_key_exists(":id",$route_params)) { 507 508 // ':id' in route params overrides URL 509 $this->id = $route_params[':id']; 510 } elseif(@in_array(":id",$route_path) 505 511 && array_key_exists(@array_search(":id", $route_path), 506 512 $this->url_path)) { … … 511 517 $this->action_params['id'] = $this->id; 512 518 } 513 // For historical reasons, continue to pass id514 // in $_REQUEST515 if($this->id != "") {516 $_REQUEST['id'] = $this->id;517 }518 519 } 520 // For historical reasons, continue to pass id 521 // in $_REQUEST 522 if($this->id != "") { 523 $_REQUEST['id'] = $this->id; 524 } 525 //error_log('id='.$this->id); 526 519 527 $this->views_path .= "/" . $this->controller; 520 528 $this->controller_file = $this->controllers_path . "/" . $this->controller . "_controller.php";
