Index: modules/forum/forum.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v
retrieving revision 1.360
diff -u -p -r1.360 forum.module
--- modules/forum/forum.module	5 Sep 2006 02:48:33 -0000	1.360
+++ modules/forum/forum.module	10 Sep 2006 04:48:06 -0000
@@ -908,10 +908,10 @@ function theme_forum_display($forums, $t
 
     if (module_exists('tracker')) {
       if ($user->uid) {
-        $output .= ' <li>'. l(t('My discussions.'), "tracker/$user->uid") .'</li>';
+        $output .= ' <li>'. l(t('My forum discussions.'), "tracker/$user->uid", array(), 'type=forum') .'</li>';
       }
 
-      $output .= ' <li>'. l(t('Active discussions.'), 'tracker') .'</li>';
+      $output .= ' <li>'. l(t('Active forum discussions.'), 'tracker', array(), 'type=forum') .'</li>';
     }
 
     if (user_access('create forum topics')) {
Index: modules/tracker/tracker.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/tracker/tracker.module,v
retrieving revision 1.136
diff -u -p -r1.136 tracker.module
--- modules/tracker/tracker.module	31 Aug 2006 20:22:36 -0000	1.136
+++ modules/tracker/tracker.module	10 Sep 2006 04:48:06 -0000
@@ -84,17 +84,28 @@ function tracker_track_user() {
  * Menu callback. Prints a listing of active nodes on the site.
  */
 function tracker_page($uid = 0) {
+  // Allow restricting list by node type(s).
+  $node_type_sql = '';
+  if (isset($_REQUEST['type'])) {
+    $allowed_types = array_keys(node_get_types());
+    $submitted_types = explode(',', $_REQUEST['type']);
+    $node_types = array_intersect($submitted_types, $allowed_types);
+    if (count($node_types)) {
+      $node_type_sql = " AND n.type IN ('". implode("','", $node_types) ."')";
+    }
+  }
+
   if ($uid) {
-    $sql = 'SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, l.last_comment_timestamp AS last_post, l.comment_count FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid INNER JOIN {users} u ON n.uid = u.uid LEFT JOIN {comments} c ON n.nid = c.nid AND (c.status = %d OR c.status IS NULL) WHERE n.status = 1 AND (n.uid = %d OR c.uid = %d) ORDER BY last_post DESC';
+    $sql = 'SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, l.last_comment_timestamp AS last_post, l.comment_count FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid INNER JOIN {users} u ON n.uid = u.uid LEFT JOIN {comments} c ON n.nid = c.nid AND (c.status = %d OR c.status IS NULL) WHERE n.status = 1 AND (n.uid = %d OR c.uid = %d)'. $node_type_sql. ' ORDER BY last_post DESC';
     $sql = db_rewrite_sql($sql);
-    $sql_count = 'SELECT COUNT(DISTINCT(n.nid)) FROM {node} n LEFT JOIN {comments} c ON n.nid = c.nid AND (c.status = %d OR c.status IS NULL) WHERE n.status = 1 AND (n.uid = %d OR c.uid = %d)';
+    $sql_count = 'SELECT COUNT(DISTINCT(n.nid)) FROM {node} n LEFT JOIN {comments} c ON n.nid = c.nid AND (c.status = %d OR c.status IS NULL) WHERE n.status = 1 AND (n.uid = %d OR c.uid = %d)'. $node_type_sql;
     $sql_count = db_rewrite_sql($sql_count);
     $result = pager_query($sql, 25, 0, $sql_count, COMMENT_PUBLISHED, $uid, $uid);
   }
   else {
-    $sql = 'SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, l.last_comment_timestamp AS last_post, l.comment_count FROM {node} n INNER JOIN {users} u ON n.uid = u.uid INNER JOIN {node_comment_statistics} l ON n.nid = l.nid WHERE n.status = 1 ORDER BY last_post DESC';
+    $sql = 'SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, l.last_comment_timestamp AS last_post, l.comment_count FROM {node} n INNER JOIN {users} u ON n.uid = u.uid INNER JOIN {node_comment_statistics} l ON n.nid = l.nid WHERE n.status = 1'. $node_type_sql .' ORDER BY last_post DESC';
     $sql = db_rewrite_sql($sql);
-    $sql_count = 'SELECT COUNT(n.nid) FROM {node} n WHERE n.status = 1';
+    $sql_count = 'SELECT COUNT(n.nid) FROM {node} n WHERE n.status = 1'. $node_type_sql;
     $sql_count = db_rewrite_sql($sql_count);
     $result = pager_query($sql, 25, 0, $sql_count);
   }
