Changeset 1875 for branches/release-34/lib/MT/CMS/Template.pm
- Timestamp:
- 04/13/08 05:15:03 (20 months ago)
- Files:
-
- 1 modified
-
branches/release-34/lib/MT/CMS/Template.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-34/lib/MT/CMS/Template.pm
r1873 r1875 638 638 @types = ( $template_type ); 639 639 } 640 $app->delete_param('filter_key') if $filter; 640 641 foreach my $tmpl_type (@types) { 641 $app->delete_param('filter_key') if $filter;642 642 if ( $tmpl_type eq 'index' ) { 643 $filter = 'index_templates';644 643 $app->param( 'filter_key', 'index_templates' ); 645 644 } 646 645 elsif ( $tmpl_type eq 'archive' ) { 647 $filter = 'archive_templates';648 646 $app->param( 'filter_key', 'archive_templates' ); 649 647 } 650 648 elsif ( $tmpl_type eq 'system' ) { 651 $filter = 'system_templates';652 649 $app->param( 'filter_key', 'system_templates' ); 653 650 } 654 651 elsif ( $tmpl_type eq 'email' ) { 655 $filter = 'email_templates';656 652 $app->param( 'filter_key', 'email_templates' ); 657 653 } … … 672 668 $tmpl_param->{template_type_label} = $template_type_label; 673 669 push @tmpl_loop, $tmpl_param; 670 } 671 if ($filter) { 672 $params->{filter_key} = $filter; 673 $params->{filter_label} = $types{$template_type}{label} 674 if exists $types{$template_type}; 675 $app->param('filter_key', $filter); 676 } else { 677 # restore filter_key param (we modified it for the 678 # sake of the individual table listings) 679 $app->delete_param('filter_key'); 674 680 } 675 681
