| | 331 | if ( $cfg_screen eq 'cfg_publish_profile' ) { |
| | 332 | my $dcty = $obj->custom_dynamic_templates || 'none'; |
| | 333 | if ( ( $dcty eq 'all' ) || ( $dcty eq 'archives' ) ) { |
| | 334 | require MT::CMS::Blog; |
| | 335 | my %param = (); |
| | 336 | MT::CMS::Blog::_create_build_order( $app, $obj, \%param ); |
| | 337 | $q->param( 'single_template', 1 ); # to show tmpl full-screen |
| | 338 | if ( $dcty eq 'all' ) { |
| | 339 | $q->param( 'type', $param{build_order} ); |
| | 340 | } |
| | 341 | elsif ( $dcty eq 'archives' ) { |
| | 342 | my @ats = map { $_->{archive_type} } @{ $param{archive_type_loop} }; |
| | 343 | $q->param( 'type', join( ',', @ats ) ); |
| | 344 | } |
| | 345 | return MT::CMS::Blog::start_rebuild_pages($app); |
| | 346 | } |
| | 347 | } |