Changeset 2565 for branches/release-40/lib/MT/Template/ContextHandlers.pm
- Timestamp:
- 06/13/08 03:34:23 (18 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/release-40/lib/MT/Template/ContextHandlers.pm
r2563 r2565 12642 12642 12643 12643 sub _load_sibling_categories { 12644 my ($ctx, $cat ) = @_;12644 my ($ctx, $cat, $class_type) = @_; 12645 12645 my $blog_id = $cat->blog_id; 12646 12646 my $r = MT::Request->instance; … … 12648 12648 return $cats if $cats; 12649 12649 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'}); 12652 12653 $r->stash('__cat_cache_'.$blog_id.'_'.$cat->parent, \@cats); 12653 12654 \@cats; … … 12687 12688 (($uncompiled =~ /<MT:?Pages/i) ? 1 : 0); 12688 12689 my $blog_id = $cat->blog_id; 12689 my $cats = _load_sibling_categories($ctx, $cat );12690 my $cats = _load_sibling_categories($ctx, $cat, $class_type); 12690 12691 my ($pos, $idx); 12691 12692 $idx = 0;
