Changeset 317 for trunk/trax/vendor/trax/action_controller.php
- Timestamp:
- 07/08/09 03:51:07 (3 years ago)
- Files:
-
- 1 modified
-
trunk/trax/vendor/trax/action_controller.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/trax/vendor/trax/action_controller.php
r314 r317 530 530 $this->controller_class = Inflector::camelize(Inflector::demodulize($this->controller)) . "Controller"; 531 531 $this->helper_file = $this->helpers_path . "/" . $this->controller . "_helper.php"; 532 # error_log("controller:{$this->controller} - controller_file:{$this->controller_file} - controller_class:{$this->controller_class} - views_path:{$this->views_path}");532 # error_log("controller:{$this->controller} - controller_file:{$this->controller_file} - controller_class:{$this->controller_class} - views_path:{$this->views_path}"); 533 533 } 534 534 } … … 745 745 $locals['content_for_layout'] = $content_for_layout; 746 746 # render the layout 747 //error_log("rendering layout: ".$this->controller_object->layout_file);747 #error_log("rendering layout: ".$this->controller_object->layout_file); 748 748 if(!$this->controller_object->render_file($this->controller_object->layout_file, false, $locals)) { 749 749 # No layout template so just echo out whatever is in $content_for_layout … … 1071 1071 if($return_as_string) { 1072 1072 $result = ob_get_contents(); 1073 ob_end_clean(); 1073 ob_end_clean(); 1074 $this->render_performed = false; 1074 1075 return $result; 1075 1076 } … … 1435 1436 * @throws ActionControllerError 1436 1437 */ 1437 function raise($error_message, $error_heading, $error_code = "404") { 1438 function raise($error_message, $error_heading, $error_code = "404") { 1438 1439 throw new ActionControllerError("Error Message: ".$error_message, $error_heading, $error_code); 1439 1440 } … … 1466 1467 } 1467 1468 } else { 1468 echo "<font face=\"verdana, arial, helvetica, sans-serif\">\n"; 1469 echo "<h2>Application Error</h2>Trax application failed to start properly"; 1470 echo "</font>\n"; 1471 } 1469 if($error_code == "404") { 1470 echo "<h2>404 Error - File not found.</h2>"; 1471 } else { 1472 echo "<font face=\"verdana, arial, helvetica, sans-serif\">\n"; 1473 echo "<h2>Application Error</h2>Trax application failed to start properly"; 1474 echo "</font>\n"; 1475 } 1476 } 1477 1472 1478 } 1473 1479
