The Navigation-block is *ALWAYS* displayed.
Also when there is nothing inside the block. I tried to fix this myself, but it didn't work out the way I want'd it.

Comments

Kjartan’s picture

Assigned: Unassigned » Kjartan

Here is a patch:

Index: user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user.module,v
retrieving revision 1.221
diff -u -r1.221 user.module
--- user.module	28 Sep 2003 18:53:30 -0000	1.221
+++ user.module	30 Sep 2003 10:36:43 -0000
@@ -425,8 +425,10 @@
         }
         return $block;
       case 1:
-        $block["subject"] = $user->uid ? $user->name : t("Navigation");
-        $block["content"] = "<div id=\"menu\">". menu_tree() ."</div>";
+        if ($menu = menu_tree()) {
+          $block["subject"] = $user->uid ? $user->name : t("Navigation");
+          $block["content"] = "<div id=\"menu\">$menu</div>";
+        }
         return $block;
       case 2:
         if (user_access("access content")) {
bkessels’s picture

Project: Drupal
Category: bug reports
Component: user.module
Priority: normal
Version: cvs
-Assigned to: Anonymous
+Assigned to: Kjartan
Reported by: Anonymous
Updated by: Kjartan
Status: active

> Here is a patch:

This patch breaks the menu leaves [v] and [o].
the css list gets broken. At least in my theme it does.

this one puts the tags

around the menu in the correct way.

Ber

RCS file: /cvs/drupal/drupal/modules/user.module,v
retrieving revision 1.221
diff -u -r1.221 user.module

Anonymous’s picture

Made it into CVS on 30 September 2003.

Anonymous’s picture

Sorry, forgot to mark the status as fixed..

Anonymous’s picture

Automatically closed due to inactivity (marked fixed for 14 days).

Anonymous’s picture

This is fixed in CVS.

Anonymous’s picture

Automatically closed due to inactivity (marked fixed for 14 days).