? mysite-links.patch
Index: mysite.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mysite/mysite.module,v
retrieving revision 1.57
diff -u -p -r1.57 mysite.module
--- mysite.module	1 Sep 2007 21:18:33 -0000	1.57
+++ mysite.module	2 Sep 2007 01:04:46 -0000
@@ -483,20 +483,22 @@ function mysite_link($type, $node = NULL
     // 0 == no; 1 == always, 2 == page view only
     if ($show == 1 || ($show == 2 && !$teaser)) {
       global $user;
-      $link = l(mysite_sitename(), 'mysite/'. $user->uid . '/view', array('class' => 'mysite-anchor'));
-      drupal_add_js(drupal_get_path('module', 'mysite') .'/mysite_links.js', 'module');
-      drupal_add_css(drupal_get_path('module', 'mysite') .'/mysite_links.css');    
-      $links = array();
-      // we already prepare the links in hook_block, so get them and theme them.
-      $data = mysite_block('view', 0, $node->nid);
-      $string = str_replace('<ul>', '', $data['content']);
-      $content = str_replace('</ul>', '', $string);
-      $links['mysite'] = array(
-          'title' => theme_mysite_links($link, $content),
-          'href' => 'mysite/'. $user->uid . '/view',
-          'html' => TRUE
-      ); 
-      return $links;
+      if ($user->uid > 0) {
+        $link = l(mysite_sitename(), 'mysite/'. $user->uid . '/view', array('class' => 'mysite-anchor'));
+        drupal_add_js(drupal_get_path('module', 'mysite') .'/mysite_links.js', 'module');
+        drupal_add_css(drupal_get_path('module', 'mysite') .'/mysite_links.css');    
+        $links = array();
+        // we already prepare the links in hook_block, so get them and theme them.
+        $data = mysite_block('view', 0, $node->nid);
+        $string = str_replace('<ul>', '', $data['content']);
+        $content = str_replace('</ul>', '', $string);
+        $links['mysite'] = array(
+            'title' => theme_mysite_links($link, $content),
+            'href' => 'mysite/'. $user->uid . '/view',
+            'html' => TRUE
+        ); 
+        return $links;
+      }
     }  
   }
 }
