Changeset 2504 for branches/release-39/lib/MT/CMS/Template.pm
- Timestamp:
- 06/04/08 03:57:17 (18 months ago)
- Files:
-
- 1 modified
-
branches/release-39/lib/MT/CMS/Template.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-39/lib/MT/CMS/Template.pm
r2502 r2504 113 113 $param->{published_url} = $published_url if $published_url; 114 114 $param->{saved_rebuild} = 1 if $q->param('saved_rebuild'); 115 $param->{static_maps} = $obj->build_type == MT::PublishOption::DYNAMIC() ? 0 : 1; 115 116 116 117 my $filter = $app->param('filter_key'); … … 297 298 $param->{object_loop} = $param->{template_map_loop} = $maps 298 299 if @$maps; 299 my %archive_types = map { $_->{archive_label} => 1 } @$maps; 300 $param->{enabled_archive_types} = join(", ", sort keys %archive_types); 300 my %at; 301 my $build_type = MT::PublishOption::DYNAMIC(); 302 my $build_type_0 = 0; 303 foreach my $map ( @$maps ) { 304 $at{ $map->{archive_label} } = 1; 305 $build_type_0 = $map->{map_build_type}; 306 $build_type = $map->{map_build_type} 307 if MT::PublishOption::DYNAMIC() ne $map->{map_build_type}; 308 } 309 $param->{enabled_archive_types} = join(", ", sort keys %at); 310 $param->{static_maps} = $build_type == MT::PublishOption::DYNAMIC() ? 0 : 1; 311 $param->{build_type_0} = 1 unless $build_type_0; 301 312 } 302 313 }
