Show
Ignore:
Timestamp:
02/14/08 21:09:26 (22 months ago)
Author:
bchoate
Message:

Broke CMS into smaller parts to reduce memory footprint and group code into logical parts. BugId:58666

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-30/lib/MT/App.pm

    r1366 r1369  
    532532    if ($ENV{MOD_PERL}) { 
    533533        if ($app->{response_message}) { 
    534             $app->{apache}->status_line(($app->response_code || 200) . " "  
    535                                         . $app->{response_message}); 
     534            $app->{apache}->status_line(($app->response_code || 200) 
     535                                        . ($app->{response_message} ? ' ' . $app->{response_message} : ''); 
    536536        } else { 
    537537            $app->{apache}->status($app->response_code || 200); 
     
    613613    if ($MT::DebugMode & 128) { 
    614614        MT->add_callback('pre_run', 1, $app, sub { $app->pre_run_debug }); 
    615         MT->add_callback('post_run', 1, $app, sub { $app->post_run_debug }); 
     615        MT->add_callback('takedown', 1, $app, sub { $app->post_run_debug }); 
    616616    } 
    617617    $app->{vtbl} = $app->registry("methods"); 
     
    20722072        } 
    20732073 
     2074        my $mode = $app->mode || 'default'; 
     2075 
    20742076        REQUEST: 
    20752077        { 
    20762078            my $requires_login = $app->{requires_login}; 
    2077  
    2078             my $mode = $app->mode || 'default'; 
    20792079 
    20802080            my $code = $app->handlers_for_mode($mode); 
     
    21612161                    my @forward_params = @{ $app->{forward_params} } 
    21622162                        if $app->{forward_params}; 
     2163                    $app->{forward_params} = undef; 
    21632164                    my $content = $code->($app, @forward_params); 
    21642165                    $app->response_content($content) 
     
    21702171 
    21712172            if (my $new_mode = $app->{forward}) { 
    2172                 $app->mode($new_mode, @{ $app->{forward_params} || [] }); 
     2173                $mode = $new_mode; 
    21732174                goto REQUEST; 
    21742175            }