Changeset 314 for trunk/trax/vendor

Show
Ignore:
Timestamp:
07/07/09 23:13:43 (3 years ago)
Author:
john
Message:

updates

Location:
trunk/trax/vendor/trax
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/trax/vendor/trax/action_controller.php

    r312 r314  
    14481448        $trace = $exception->getTraceAsString(); 
    14491449        header("HTTP/1.0 {$error_code} {$error_heading}"); 
    1450         # check for user's layout for errors 
    1451         if(TRAX_ENV == "development" && file_exists(Trax::$layouts_path."/trax_error.".Trax::$views_extension)) { 
    1452             include(Trax::$layouts_path."/trax_error.".Trax::$views_extension); 
    1453         } elseif(TRAX_ENV == "development" && file_exists(TRAX_LIB_ROOT."/templates/error.phtml")) { 
    1454             # use default layout for errors 
    1455             include(TRAX_LIB_ROOT."/templates/error.phtml"); 
    1456         } elseif(TRAX_ENV == "development") { 
    1457             echo "<font face=\"verdana, arial, helvetica, sans-serif\">\n"; 
    1458             echo "<h1>$error_heading</h1>\n"; 
    1459             echo "<p>$error_message</p>\n"; 
    1460             if($trace) { 
    1461                 echo "<pre style=\"background-color: #eee;padding:10px;font-size: 11px;\">"; 
    1462                 echo "<code>$trace</code></pre>\n"; 
     1450        # check for user's layout for errors  
     1451        if(TRAX_ENV == "development" || Trax::$show_trax_errors) { 
     1452            if(file_exists(Trax::$layouts_path."/trax_error.".Trax::$views_extension)) { 
     1453                include(Trax::$layouts_path."/trax_error.".Trax::$views_extension); 
     1454            } elseif(file_exists(TRAX_LIB_ROOT."/templates/error.phtml")) { 
     1455                # use default layout for errors 
     1456                include(TRAX_LIB_ROOT."/templates/error.phtml"); 
     1457            } else { 
     1458                echo "<font face=\"verdana, arial, helvetica, sans-serif\">\n"; 
     1459                echo "<h1>$error_heading</h1>\n"; 
     1460                echo "<p>$error_message</p>\n"; 
     1461                if($trace) { 
     1462                    echo "<pre style=\"background-color: #eee;padding:10px;font-size: 11px;\">"; 
     1463                    echo "<code>$trace</code></pre>\n"; 
     1464                } 
     1465                echo "</font>\n";                 
    14631466            } 
    1464             echo "</font>\n"; 
    14651467        } else { 
    14661468            echo "<font face=\"verdana, arial, helvetica, sans-serif\">\n"; 
    14671469            echo "<h2>Application Error</h2>Trax application failed to start properly"; 
    1468             echo "</font>\n"; 
     1470            echo "</font>\n";             
    14691471        } 
    14701472    } 
  • trunk/trax/vendor/trax/trax.php

    r303 r314  
    6767        $session_lifetime = "0", 
    6868        $session_maxlifetime_minutes = "20", 
    69         $version = null; 
     69        $version = null, 
     70        $show_trax_errors = false; 
    7071 
    7172    function initialize() {