diff -urp --strip-trailing-cr ../category/category.module ./category.module --- ../category/category.module 2009-08-05 06:52:53.000000000 +0200 +++ ./category.module 2009-09-27 19:37:44.000000000 +0200 @@ -1698,7 +1698,7 @@ function category_form_category_submit($ * category or container, and how to display it. Gets the rendered node * listing if appropriate. * - * @param $category + * @param $node * An object representing the category or container. * * @return @@ -1706,45 +1706,21 @@ function category_form_category_submit($ */ function category_node_listing($node) { $is_container = empty($node->category['cnid']); - $show_nodes = FALSE; + $show_nodes = TRUE; $category_display = NULL; - - if (!module_exists('category_display')) { - if ($is_container) { - if ($node->category['depth']) { - $show_nodes = TRUE; - } - } - else { - $show_nodes = TRUE; - } - } - else { + if (module_exists('category_display')) { $category_display = isset($node->category_display['cid']) ? (object) $node->category_display : category_display_get_container($node->category['cnid']); - if ($category_display->show_listing) { - if ($is_container) { - if ($node->category['depth']) { - $show_nodes = TRUE; - } - } - else { - $show_nodes = TRUE; - } + if (!$category_display->show_listing) { + $show_nodes = FALSE; } } if ($show_nodes) { - drupal_add_feed(url('node/'. $node->nid .'/feed'), 'RSS - '. $node->title); - - $use_views = FALSE; - if (module_exists('category_views')) { - $use_views = category_views_is_visible($node); - } - - if ($use_views) { + if (module_exists('category_views') && category_views_is_visible($node)) { return category_views_render_nodes($node); } - else { + elseif (!$is_container || $node->category['depth']) { + drupal_add_feed(url('node/'. $node->nid .'/feed'), 'RSS - '. $node->title); $nodes = category_select_nodes(array($node->category['cid']), 'or', $node->category['depth'], TRUE, TRUE); return category_render_nodes($nodes, $category_display); }