Changeset 2715
- Timestamp:
- 07/04/08 08:47:40 (20 months ago)
- Files:
-
- 1 modified
-
branches/release-41/lib/MT/CMS/Template.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-41/lib/MT/CMS/Template.pm
r2707 r2715 1414 1414 require MT::TemplateMap; 1415 1415 my @p = $q->param; 1416 my @static_maps;1416 my %static_maps; 1417 1417 for my $p (@p) { 1418 1418 my $map; … … 1428 1428 $map = MT::TemplateMap->load($map_id) 1429 1429 or next; 1430 $map->file_template( $q->param($p) ); 1430 my $file_template = $q->param($p); 1431 my $build_type_1 = $q->param("map_build_type_$map_id"); 1432 # Populate maps whose build type is dynamic 1433 # and file template are changed 1434 $static_maps{ $map->id } = 1 1435 if ( ( $file_template ne $map->file_template ) 1436 && ( MT::PublishOption::DYNAMIC() eq $build_type_1 ) ); 1437 $map->file_template( $file_template ); 1431 1438 $map->save; 1432 1439 } … … 1439 1446 # Populate maps that are changed from static to dynamic 1440 1447 # This should capture new map as well 1441 push @static_maps, $map->id1448 $static_maps{ $map->id } = 1 1442 1449 if ( ( $build_type ne $map->build_type ) 1443 1450 && ( MT::PublishOption::DYNAMIC() eq $build_type ) ); … … 1457 1464 } 1458 1465 } 1459 $app->{static_dynamic_maps} = @static_maps ? \@static_maps: 0;1466 $app->{static_dynamic_maps} = %static_maps ? [ keys %static_maps ] : 0; 1460 1467 } 1461 1468
