Show
Ignore:
Timestamp:
04/17/08 22:43:48 (20 months ago)
Author:
bchoate
Message:

Fixes for propogation of build_type from template to templatemaps. BugId:79370

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-35/lib/MT/TemplateMap.pm

    r1873 r1957  
    4646sub save { 
    4747    my $map = shift; 
    48     $map->SUPER::save(); 
     48    my $res = $map->SUPER::save(); 
     49    return $res unless $res; 
     50 
    4951    my $at   = $map->archive_type; 
    5052    my $blog = MT->model('blog')->load($map->blog_id) 
     
    5658                if $blog_at ne 'None'; 
    5759    push @ats, $map->archive_type; 
    58     $blog->archive_type(join ',', @ats); 
    59     $blog->save; 
     60    my $new_at = join ',', @ats; 
     61    if ($new_at ne $blog_at) { 
     62        $blog->archive_type($new_at); 
     63        $blog->save; 
     64    } 
     65    return 1; 
    6066} 
    6167