Changeset 2535 for branches/release-39/lib/MT/Template/ContextHandlers.pm
- Timestamp:
- 06/10/08 02:18:16 (18 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/release-39/lib/MT/Template/ContextHandlers.pm
r2530 r2535 12638 12638 12639 12639 sub _load_sibling_categories { 12640 my ($ctx, $cat ) = @_;12640 my ($ctx, $cat, $class_type) = @_; 12641 12641 my $blog_id = $cat->blog_id; 12642 12642 my $r = MT::Request->instance; … … 12644 12644 return $cats if $cats; 12645 12645 12646 my @cats = MT::Category->load({blog_id => $blog_id, parent => $cat->parent}, 12646 my $class = MT->model($class_type); 12647 my @cats = $class->load({blog_id => $blog_id, parent => $cat->parent}, 12647 12648 {'sort' => 'label', direction => 'ascend'}); 12648 12649 $r->stash('__cat_cache_'.$blog_id.'_'.$cat->parent, \@cats); … … 12683 12684 (($uncompiled =~ /<MT:?Pages/i) ? 1 : 0); 12684 12685 my $blog_id = $cat->blog_id; 12685 my $cats = _load_sibling_categories($ctx, $cat );12686 my $cats = _load_sibling_categories($ctx, $cat, $class_type); 12686 12687 my ($pos, $idx); 12687 12688 $idx = 0;
