Changeset 2958

Show
Ignore:
Timestamp:
08/21/08 04:23:24 (3 months ago)
Author:
fumiakiy
Message:

Reverted r2567; stop processing archivemaps if the template passed is global. BugId:80434

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/mt4.21/lib/MT/Template.pm

    r2957 r2958  
    662662sub pre_remove_children { 
    663663    my $tmpl = shift; 
    664     # global templates doesn't have child records 
    665     if ( $tmpl->blog_id ) { 
    666         $tmpl->remove_children({ key => 'template_id' }); 
    667     } 
     664    $tmpl->remove_children({ key => 'template_id' }); 
    668665} 
    669666 
  • branches/mt4.21/lib/MT/TemplateMap.pm

    r2396 r2958  
    102102        if ( $_[0] && $_[0]->{template_id} ) { 
    103103            my $tmpl = MT::Template->load( $_[0]->{template_id} ); 
    104             $blog_id = $tmpl->blog_id if $tmpl; 
     104            if ( $tmpl ) { 
     105                return $result unless $tmpl->blog_id; # global template does not have maps 
     106                $blog_id = $tmpl->blog_id; 
     107            } 
    105108        } 
    106109