Changeset 2957

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

Don't attempt to initiate remove_children because global templates do not have child records. BugId:80434

Files:

Legend:

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

    r2882 r2957  
    662662sub pre_remove_children { 
    663663    my $tmpl = shift; 
    664     $tmpl->remove_children({ key => 'template_id' }); 
     664    # global templates doesn't have child records 
     665    if ( $tmpl->blog_id ) { 
     666        $tmpl->remove_children({ key => 'template_id' }); 
     667    } 
    665668} 
    666669