Changeset 2565

Show
Ignore:
Timestamp:
06/13/08 03:34:23 (5 months ago)
Author:
fumiakiy
Message:

Load folders when in folder context. BugId:80062

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/release-40/lib/MT/Template/ContextHandlers.pm

    r2563 r2565  
    1264212642 
    1264312643sub _load_sibling_categories { 
    12644     my ($ctx, $cat) = @_; 
     12644    my ($ctx, $cat, $class_type) = @_; 
    1264512645    my $blog_id = $cat->blog_id; 
    1264612646    my $r = MT::Request->instance; 
     
    1264812648    return $cats if $cats; 
    1264912649 
    12650     my @cats = MT::Category->load({blog_id => $blog_id, parent => $cat->parent}, 
    12651                                   {'sort' => 'label', direction => 'ascend'}); 
     12650    my $class = MT->model($class_type); 
     12651    my @cats = $class->load({blog_id => $blog_id, parent => $cat->parent}, 
     12652                            {'sort' => 'label', direction => 'ascend'}); 
    1265212653    $r->stash('__cat_cache_'.$blog_id.'_'.$cat->parent, \@cats); 
    1265312654    \@cats; 
     
    1268712688        (($uncompiled =~ /<MT:?Pages/i) ? 1 : 0); 
    1268812689    my $blog_id = $cat->blog_id; 
    12689     my $cats = _load_sibling_categories($ctx, $cat); 
     12690    my $cats = _load_sibling_categories($ctx, $cat, $class_type); 
    1269012691    my ($pos, $idx); 
    1269112692    $idx = 0;