Changeset 1308 for branches/release-29/lib/MT/App/CMS.pm
- Timestamp:
- 01/22/08 00:15:49 (23 months ago)
- Files:
-
- 1 modified
-
branches/release-29/lib/MT/App/CMS.pm (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-29/lib/MT/App/CMS.pm
r1261 r1308 755 755 permission => 'manage_pages', 756 756 condition => sub { 757 return 0 if $app->mode eq'view';757 return $app->mode ne 'view'; 758 758 }, 759 759 }, … … 766 766 permission => 'manage_pages', 767 767 condition => sub { 768 return 0 if $app->mode eq'view';768 return $app->mode ne 'view'; 769 769 }, 770 770 }, … … 1562 1562 my @blogs = 1563 1563 map { $_->blog_id } 1564 grep { $_->can_create_post || $_->can_pub ish_post || $_->can_edit_all_posts }1564 grep { $_->can_create_post || $_->can_publish_post || $_->can_edit_all_posts } 1565 1565 MT::Permission->load( { author_id => $app->user->id } ); 1566 1566 return 1 if @blogs; … … 2912 2912 $arg{offset} = $offset = $total - $limit; 2913 2913 } 2914 elsif ( ( $offset < 0 ) || ( $total - $offset < $limit) ) {2915 $arg{offset} = $offset = 0;2914 elsif ( $offset && ( ( $offset < 0 ) || ( $total - $offset < $limit ) ) ) { 2915 $arg{offset} = $offset = $total - $limit; 2916 2916 } 2917 2917 else { … … 2973 2973 $param{object_label_plural} = $tag_class->class_label_plural; 2974 2974 $param{object_type} = 'tag'; 2975 2976 my $search_types = $app->search_apis($app->blog ? 'blog' : 'system'); 2977 if (grep { $_->{key} eq $param{tag_object_type} } @$search_types) { 2978 $param{search_type} = $param{tag_object_type}; 2979 $param{search_label} = $param{tag_object_label_plural}; 2980 } else { 2981 $param{search_type} = 'entry'; 2982 $param{search_label} = $app->translate("Entries"); 2983 } 2984 2975 2985 $param{list_start} = $offset + 1; 2976 2986 $param{list_end} = $offset + scalar @$data; … … 4413 4423 $param{can_create_blog} = $author->can_create_blog; 4414 4424 $param{saved_deleted} = $app->param('saved_deleted'); 4425 $param{refreshed} = $app->param('refreshed'); 4415 4426 $param{nav_blogs} = 1; 4416 4427 $param{list_noncron} = 1; … … 11895 11906 $arg{offset} = $offset = $total - $limit; 11896 11907 } 11897 elsif ( ( $offset < 0 ) || ( $total - $offset < $limit) ) {11898 $arg{offset} = $offset = 0;11908 elsif ( $offset && ( ( $offset < 0 ) || ( $total - $offset < $limit ) ) ) { 11909 $arg{offset} = $offset = $total - $offset; 11899 11910 } 11900 11911 elsif ($offset) { … … 12332 12343 $arg{offset} = $offset = $total - $limit; 12333 12344 } 12334 elsif ( ( $offset < 0 ) || ( $total - $offset < $limit) ) {12335 $arg{offset} = $offset = 0;12345 elsif ( $offset && ( ( $offset < 0 ) || ( $total - $offset < $limit ) ) ) { 12346 $arg{offset} = $offset = $total - $offset; 12336 12347 } 12337 12348 else {
