Show
Ignore:
Timestamp:
01/22/08 00:15:49 (23 months ago)
Author:
bsmith
Message:

Merging commits from release-28 changesets 1274 to 1306

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-29/lib/MT/App/CMS.pm

    r1261 r1308  
    755755                permission  => 'manage_pages', 
    756756                condition   => sub { 
    757                     return 0 if $app->mode eq 'view'; 
     757                    return $app->mode ne 'view'; 
    758758                }, 
    759759            }, 
     
    766766                permission  => 'manage_pages', 
    767767                condition   => sub { 
    768                     return 0 if $app->mode eq 'view'; 
     768                    return $app->mode ne 'view'; 
    769769                }, 
    770770            }, 
     
    15621562                    my @blogs =  
    15631563                        map { $_->blog_id } 
    1564                           grep { $_->can_create_post || $_->can_pubish_post || $_->can_edit_all_posts } 
     1564                          grep { $_->can_create_post || $_->can_publish_post || $_->can_edit_all_posts } 
    15651565                          MT::Permission->load( { author_id => $app->user->id } ); 
    15661566                    return 1 if @blogs; 
     
    29122912        $arg{offset} = $offset = $total - $limit; 
    29132913    } 
    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; 
    29162916    } 
    29172917    else { 
     
    29732973    $param{object_label_plural}     = $tag_class->class_label_plural; 
    29742974    $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 
    29752985    $param{list_start}              = $offset + 1; 
    29762986    $param{list_end}                = $offset + scalar @$data; 
     
    44134423    $param{can_create_blog} = $author->can_create_blog; 
    44144424    $param{saved_deleted}   = $app->param('saved_deleted'); 
     4425    $param{refreshed}       = $app->param('refreshed'); 
    44154426    $param{nav_blogs}       = 1; 
    44164427    $param{list_noncron}    = 1; 
     
    1189511906        $arg{offset} = $offset = $total - $limit; 
    1189611907    } 
    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; 
    1189911910    } 
    1190011911    elsif ($offset) { 
     
    1233212343        $arg{offset} = $offset = $total - $limit; 
    1233312344    } 
    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; 
    1233612347    } 
    1233712348    else {