Index: wp-includes/category-template.php
===================================================================
--- wp-includes/category-template.php	(revision 15496)
+++ wp-includes/category-template.php	(working copy)
@@ -46,30 +46,51 @@
  * @param int $id Category ID.
  * @param bool $link Optional, default is false. Whether to format with link.
  * @param string $separator Optional, default is '/'. How to separate categories.
- * @param bool $nicename Optional, default is false. Whether to use nice name for display.
+ * @param bool $useslug Optional, default is false. Whether to use nice name or a slug for display.
  * @param array $visited Optional. Already linked to categories to prevent duplicates.
+ * @param bool $trailing_separator Optional. Use trailing separator? Default true
+ * @param bool $use_desc_title Optional. Use description for title? Default false
  * @return string
  */
-function get_category_parents( $id, $link = false, $separator = '/', $nicename = false, $visited = array() ) {
+function get_category_parents( $id, $link = false, $separator = '/', $useslug = false, $visited = array(), $trailing_separator = true, $use_desc_title = false ) {
 	$chain = '';
 	$parent = &get_category( $id );
 	if ( is_wp_error( $parent ) )
 		return $parent;
 
-	if ( $nicename )
+	if ( $useslug )
 		$name = $parent->slug;
 	else
 		$name = $parent->cat_name;
-
+		
+	// If this is not a top-level parent, first get the parent of this category.
 	if ( $parent->parent && ( $parent->parent != $parent->term_id ) && !in_array( $parent->parent, $visited ) ) {
 		$visited[] = $parent->parent;
-		$chain .= get_category_parents( $parent->parent, $link, $separator, $nicename, $visited );
+		$chain .= get_category_parents( $parent->parent, $link, $separator, $useslug, $visited, $trailing_separator, $use_desc_title );
+		
+		// If the parent output did NOT contain a trailing separator
+		// we need to add the separator between category names/links
+		if( !$trailing_separator )
+			$chain .= $separator;
+		
 	}
 
-	if ( $link )
-		$chain .= '<a href="' . get_category_link( $parent->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $parent->cat_name ) ) . '">'.$name.'</a>' . $separator;
-	else
-		$chain .= $name.$separator;
+	if ( $link ) {
+		$title = "";
+		if ( $use_desc_title ) 
+			$title = category_description( $parent->term_id );
+		if ( $title == "")
+			$title = esc_attr( sprintf( __( "View all posts in %s" ), $parent->cat_name ) );
+		$chain .= '<a href="' . get_category_link( $parent->term_id ) . '" title="' . $title . '">'.$name.'</a>';
+	}
+	else {
+		// Add this category name onto the end of the string which already contains all of its parent names
+		$chain .= $name;
+	}
+		
+	if( $trailing_separator )
+		$chain .= $separator;
+			
 	return $chain;
 }
 
