Changeset 3529 for trunk/lib/MT/App/CMS.pm
- Timestamp:
- 03/12/09 05:46:37 (9 months ago)
- Files:
-
- 1 modified
-
trunk/lib/MT/App/CMS.pm (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/MT/App/CMS.pm
r3082 r3529 534 534 order => 100, 535 535 code => "${pkg}Comment::unapprove_item", 536 permission => ' manage_feedback,publish_post',536 permission => 'edit_all_posts,manage_feedback,publish_post', 537 537 }, 538 538 }, … … 542 542 order => 100, 543 543 code => "${pkg}Comment::unapprove_item", 544 permission => ' manage_feedback,publish_post',544 permission => 'edit_all_posts,manage_feedback,publish_post', 545 545 condition => sub { 546 546 return 1; … … 1881 1881 || ( $page->isa('MT::Template') && !$page->param('page_actions') ) ) 1882 1882 { 1883 $param->{page_actions} ||= $app->page_actions( $app->mode ); 1883 # Using a sub here to delay the loading of page actions, since not all 1884 # templates actually utilize them. 1885 $param->{page_actions} ||= sub { $app->page_actions( $app->mode ) }; 1884 1886 } 1885 1887 … … 2425 2427 = MT::Permission->load( { blog_id => $blog_id, author_id => 0 } ); 2426 2428 my %default = %{ $app->config->DefaultEntryPrefs }; 2429 %default = map { lc $_ => $default{$_} } keys %default; 2427 2430 if ( $perm && $perm->entry_prefs ) { 2428 2431 $prefs = $perm->entry_prefs; … … 2440 2443 my @p; 2441 2444 foreach my $p ( keys %map ) { 2442 push @p, 2443 $map{$p} . ':' . ( $default{$p} || $default{ lc $p } ) 2444 if ( $default{$p} || $default{ lc $p } ); 2445 push @p, $map{$p} . ':' . $default{ lc $p } 2446 if $default{ lc $p }; 2445 2447 } 2446 2448 $prefs = join ',', @p; … … 2628 2630 foreach my $field (@fields) { 2629 2631 if ( $entry->can($field) ) { 2630 $entry->$field( _convert_word_chars( $app, $entry->$field ) ); 2632 if ( $field eq 'tags' ) { 2633 my @tags 2634 = map { _convert_word_chars( $app, $_ ) } $entry->tags; 2635 $entry->set_tags(@tags); 2636 } 2637 else { 2638 $entry->$field( _convert_word_chars( $app, $entry->$field ) ); 2639 } 2631 2640 } 2632 2641 }
