Changeset 1877 for branches/release-34/lib/MT/CMS/Template.pm
- Timestamp:
- 04/14/08 02:38:34 (20 months ago)
- Files:
-
- 1 modified
-
branches/release-34/lib/MT/CMS/Template.pm (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-34/lib/MT/CMS/Template.pm
r1875 r1877 1 # Movable Type (r) Open Source (C) 2001-2008 Six Apart, Ltd. 2 # This program is distributed under the terms of the 3 # GNU General Public License, version 2. 4 # 5 # $Id$ 6 1 7 package MT::CMS::Template; 2 8 … … 76 82 ( ( $obj->type eq 'index' ) 77 83 && ( ( $blog->custom_dynamic_templates || "" ) ne 'all' ) ); 78 $param->{custom_dynamic} =79 $blog && ( $blog->custom_dynamic_templates || "" ) eq 'custom';80 $param->{has_build_options} =81 ( $param->{custom_dynamic} || $param->{has_rebuild} );82 84 83 85 # FIXME: enumeration of types … … 243 245 } 244 246 # publish options 245 $param->{publish_queue } = $blog->publish_queue if $blog;247 $param->{publish_queue_available} = eval 'require List::Util; require Scalar::Util; 1;'; 246 248 $param->{build_type} = $obj->build_type; 247 249 $param->{ 'build_type_' . ( $obj->build_type || 0 ) } = 1; … … 563 565 $params->{published} = $app->param('published'); 564 566 $params->{saved_copied} = $app->param('saved_copied'); 567 $params->{saved_deleted} = $app->param('saved_deleted'); 568 $params->{saved} = $app->param('saved'); 565 569 566 570 # determine list of system template types: … … 652 656 $app->param( 'filter_key', 'email_templates' ); 653 657 } 658 elsif ( $tmpl_type eq 'module' ) { 659 $app->param( 'filter_key', 'module_templates' ); 660 } 654 661 $terms->{type} = $types{$tmpl_type}->{type}; 655 662 my $tmpl_param = $app->listing( … … 1062 1069 name => $name, 1063 1070 value => $_->{template}, 1064 default => ( $_->{default} || 0 ) 1071 default => ( $_->{default} || 0 ), 1065 1072 }; 1066 1073 } … … 1183 1190 my ( $app, $obj ) = @_; 1184 1191 1185 $obj->rebuild_me(0)1186 if $app->param('current_rebuild_me')1187 && !$app->param('rebuild_me');1188 $obj->build_dynamic(0)1189 if $app->param('current_build_dynamic')1190 && !$app->param('build_dynamic');1191 1192 1192 ## Strip linefeed characters. 1193 1193 ( my $text = $obj->text ) =~ tr/\r//d; … … 1429 1429 1430 1430 my $param = {}; 1431 my $blog = $app->blog; 1432 $param->{dynamicity} = $blog->custom_dynamic_templates || 'none'; 1431 1433 $param->{screen_id} = "publishing-profile-dialog"; 1434 $param->{return_args} = $app->param('return_args'); 1432 1435 1433 1436 $app->build_page('dialog/publishing_profile.tmpl',
