summaryrefslogtreecommitdiffstats
path: root/wp-includes/category-template.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-12-01 15:41:48 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-12-01 15:41:48 +0000
commitf57c5009b529dcc2494fc719f605ef64b7f9b4c7 (patch)
treea2987f298fd6ebeca0dc4c0e286a969745f1a497 /wp-includes/category-template.php
parentaae5b160f307adf0703ae8f7c2b158b91570ec95 (diff)
downloadwordpress-mu-f57c5009b529dcc2494fc719f605ef64b7f9b4c7.tar.gz
wordpress-mu-f57c5009b529dcc2494fc719f605ef64b7f9b4c7.tar.xz
wordpress-mu-f57c5009b529dcc2494fc719f605ef64b7f9b4c7.zip
Category fixes from Andy
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@818 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/category-template.php')
-rw-r--r--wp-includes/category-template.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php
index 3c7d10e..359f04a 100644
--- a/wp-includes/category-template.php
+++ b/wp-includes/category-template.php
@@ -31,6 +31,9 @@ function get_category_link($category_id) {
$category = &get_category($category_id);
$category_nicename = $category->category_nicename;
+ if ( $category->category_parent == $category_id ) // recursive recursion
+ $category->category_parent = 0;
+
if ( $parent = $category->category_parent )
$category_nicename = get_category_parents($parent, false, '/', true) . $category_nicename . '/';
@@ -238,7 +241,10 @@ function wp_list_categories($args = '') {
$output .= __("No categories");
} else {
global $wp_query;
- $r['current_category'] = $wp_query->get_queried_object_id();
+
+ if ( is_category() )
+ $r['current_category'] = $wp_query->get_queried_object_id();
+
if ( $hierarchical )
$depth = 0; // Walk the full depth.
else