Changeset 2504
- Timestamp:
- 06/04/08 03:57:17 (21 months ago)
- Location:
- branches/release-39
- Files:
-
- 3 modified
-
lib/MT/CMS/Template.pm (modified) (2 diffs)
-
lib/MT/WeblogPublisher.pm (modified) (2 diffs)
-
tmpl/cms/edit_template.tmpl (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 } -
branches/release-39/lib/MT/WeblogPublisher.pm
r2445 r2504 988 988 # 404 will be triggered. 989 989 require MT::PublishOption; 990 if ( $tmpl->build_dynamic 991 || ( $map->build_type == MT::PublishOption::DYNAMIC() ) ) 990 if ( $map->build_type == MT::PublishOption::DYNAMIC() ) 992 991 { 993 992 rename( … … 1003 1002 } 1004 1003 1005 return 1 if ( $tmpl->build_dynamic ) 1006 || ( $map->build_type == MT::PublishOption::DYNAMIC() ); 1004 return 1 if ( $map->build_type == MT::PublishOption::DYNAMIC() ); 1007 1005 return 1 if ( $entry && $entry->status != MT::Entry::RELEASE() ); 1008 return 1 unless ( $ tmpl->build_type );1006 return 1 unless ( $map->build_type ); 1009 1007 1010 1008 my $timer = MT->get_timer; -
branches/release-39/tmpl/cms/edit_template.tmpl
r2407 r2504 161 161 </mt:if> 162 162 <mt:unless name="build_type_0"> 163 <mt: unless name="build_dynamic">163 <mt:if name="static_maps"> 164 164 <mt:if name="can_rebuild"> 165 165 <mt:if name="template_group" like="/^(archive|index)$/"> … … 173 173 </mt:if> 174 174 </mt:if> 175 </mt: unless>175 </mt:if> 176 176 </mt:unless> 177 177 <div id="autosave-notification-<$mt:var name="bar_position" default="top"$>" class="autosave-notification"></div>
