Skip to content

Commit

Permalink
[PATCH] [#111 state:committed] Added support for direct specification…
Browse files Browse the repository at this point in the history
… of publishing build_type for archive maps via template set config.yaml. Index templates already had support for this. See https://openmelody.lighthouseapp.com/projects/26604/tickets/111 for details
  • Loading branch information
jayallen committed Jul 20, 2009
1 parent 2c8119f commit 4bf8017
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/MT/Blog.pm
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ sub create_default_templates {
$map->template_id($tmpl->id);
$map->file_template($m->{file_template}) if $m->{file_template};
$map->blog_id($tmpl->blog_id);
$map->build_type( $m->{build_type} ) if defined $m->{build_type};
$map->save;
}
}
Expand Down
3 changes: 3 additions & 0 deletions lib/MT/CMS/Template.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1822,6 +1822,7 @@ sub refresh_all_templates {
my $terms = {};
$terms->{blog_id} = $blog_id;
$terms->{type} = $val->{type};
# FIXME Enumeration of types
if ( $val->{type} =~
m/^(archive|individual|page|category|index|custom|widget|widgetset)$/ )
{
Expand Down Expand Up @@ -1881,6 +1882,7 @@ sub refresh_all_templates {
$tmpl->identifier( $val->{identifier} );
$tmpl->type( $val->{type} )
; # fixes mismatch of types for cases like "archive" => "individual"
$tmpl->build_type( $val->{build_type} ) if defined $val->{build_type};
$tmpl->linked_file('');
$tmpl->save;
}
Expand All @@ -1901,6 +1903,7 @@ sub refresh_all_templates {
identifier => $val->{identifier},
outfile => $val->{outfile},
rebuild_me => $val->{rebuild_me},
build_type => (defined($val->{build_type}) ? $val->{build_type} : 1),
}
);
$tmpl->blog_id($blog_id);
Expand Down

0 comments on commit 4bf8017

Please sign in to comment.