### Eclipse Workspace Patch 1.0
#P Sitemenu
Index: sitemenu.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/sitemenu/sitemenu.module,v
retrieving revision 1.39
diff -u -r1.39 sitemenu.module
--- sitemenu.module 13 May 2008 13:27:28 -0000 1.39
+++ sitemenu.module 23 Jun 2008 08:01:17 -0000
@@ -418,71 +418,80 @@
* @return string Themed HTML
*/
function theme_sitemenu_render_outline($tree, $vocab_type) {
- if (empty($tree)) {
- return '';
- }
-
- global $ul;
-
- $old_depth = -1;
- $output = "";
-
- for ($m = 0; $m < count($tree); $m++) {
- $term = $tree[$m];
-
- if ($term->depth > $old_depth) {
- $output .= "
\n", $delta);
- $output .= ''."\n";
- }
-
- $old_depth = $term->depth;
-
- switch($vocab_type) {
- case SITEMENU_VOCAB_TYPE_IMAGE:
- $path = 'image/tid/';
- break;
- case SITEMENU_VOCAB_TYPE_FORUM:
- $path = 'forum/';
- break;
- default:
- $path = 'taxonomy/term/';
- break;
- }
-
- $count = ($term->count) ? ' (' . $term->count . ')' : '';
- if (isset($term->description)) {
- // use the description as a title attribute for terms
- $link = l($term->name . $count, $path . $term->tid, array ("title" => $term->description));
- }
- else {
- if (isset($term->link)) {
- // This is a node
- $link = $term->link . $count;
- }
- else {
- $link = l($term->name . $count, $path . $term->tid );
- }
- }
-
- // if children exist, output with proper class and id attributes, else, output item with
- // specified link or default link
- if ($term->depth < $tree[$m+1]->depth) {
- $output .= "". $link ."\n";
- }
- else {
- $output .= "". $link ."\n";
- }
- unset($description);
- }
- if ($term->depth >= 1) { $output .= ''."\n"; }
- if ($term->depth == 0) { $output .= ''."\n"; }
- $output .= str_repeat("\n", $term->depth);
- return $output;
+ if (empty ($tree)) {
+ return '';
+ }
+
+ global $ul;
+
+ $old_depth = -1;
+ $output = "";
+
+ for ($m = 0; $m < count($tree); $m++) {
+ $term = $tree[$m];
+
+ if ($term->depth > $old_depth) {
+ $output .= "\n", $delta);
+ $output .= '' . "\n";
+ }
+
+ $old_depth = $term->depth;
+
+ switch ($vocab_type) {
+ case SITEMENU_VOCAB_TYPE_IMAGE :
+ $path = 'image/tid/';
+ break;
+ case SITEMENU_VOCAB_TYPE_FORUM :
+ $path = 'forum/';
+ break;
+ default :
+ $path = 'taxonomy/term/';
+ break;
+ }
+
+ $taxo_image = '';
+ if (module_exists('taxonomy_image')) {
+ $taxo_image = taxonomy_image_display($term->tid);
+ }
+ $count = ($term->count) ? ' (' . $term->count . ')' : '';
+ if (isset ($term->description)) {
+ // use the description as a title attribute for terms
+ $link = l($taxo_image . ' ' . t($term->name) . $count, $path . $term->tid, array (
+ "title" => $term->description,
+ "html" => true,
+
+
+ ));
+ } else {
+ if (isset ($term->link)) {
+ // This is a node
+ $link = $term->link . $count;
+ } else {
+ $link = l(t($term->name) . $count, $path . $term->tid);
+ }
+ }
+ // if children exist, output with proper class and id attributes, else, output item with
+ // specified link or default link
+ if ($term->depth < $tree[$m +1]->depth) {
+ $output .= "" . $link . "\n";
+ } else {
+ $output .= "" . $link . "\n";
+ }
+ unset ($description);
+ }
+ if ($term->depth >= 1) {
+ $output .= '' . "\n";
+ }
+ if ($term->depth == 0) {
+ $output .= '' . "\n";
+ }
+ $output .= str_repeat("\n", $term->depth);
+ return $output;
}
function sitemenu_taxonomy($op, $type, $object) {