Changeset 1362

Show
Ignore:
Timestamp:
02/13/08 04:30:51 (22 months ago)
Author:
bchoate
Message:

Fixes for timer bug affecting MT-Wizard. BugId:68176

Location:
branches/mt4.11/lib/MT
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/mt4.11/lib/MT/Template.pm

    r1361 r1362  
    215215    if (MT->config->PerformanceLogging) { 
    216216        $timer = MT->get_timer(); 
    217         # $start = Time::HiRes::time(); 
    218     } else { 
    219         $timer = {}; 
    220     } 
    221     local $timer->{elapsed} = 0; 
     217    } 
     218    local $timer->{elapsed} = 0 if $timer; 
    222219 
    223220    local $ctx->{__stash}{template} = $tmpl; 
     
    259256 
    260257    if ($timer) { 
    261         # $timer->{prev} = $start; 
    262258        $timer->mark("MT::Template::build[" . ($tmpl->name || $tmpl->{__file}).']'); 
    263259    } 
  • branches/mt4.11/lib/MT/WeblogPublisher.pm

    r1361 r1362  
    13981398    if ($timer) { 
    13991399        $timer->pause_partial; 
    1400     } else { 
    1401         $timer = {}; 
    1402     } 
    1403     local $timer->{elapsed} = 0; 
     1400    } 
     1401    local $timer->{elapsed} = 0 if $timer; 
    14041402 
    14051403    if ( 
     
    17001698        if ($timer) { 
    17011699            $timer->pause_partial; 
    1702         } else { 
    1703             $timer = {}; 
    1704         } 
    1705         local $timer->{elapsed} = 0; 
     1700        } 
     1701        local $timer->{elapsed} = 0 if $timer; 
    17061702 
    17071703        my $ctx = MT::Template::Context->new;