Index: modules/forum/forum.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v
retrieving revision 1.365
diff -u -p -r1.365 forum.module
--- modules/forum/forum.module	21 Nov 2006 20:14:17 -0000	1.365
+++ modules/forum/forum.module	23 Nov 2006 18:02:29 -0000
@@ -905,14 +905,14 @@ 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')) {
-      $output .= '<li>'. l(t('Post new forum topic.'), "node/add/forum/$tid") .'</li>';
+      $output .= '<li>'. l(t('Post new forum topic'), "node/add/forum/$tid") .'</li>';
     }
     else if ($user->uid) {
       $output .= '<li>'. t('You are not allowed to post a new forum topic.') .'</li>';
Index: modules/tracker/tracker.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/tracker/tracker.module,v
retrieving revision 1.138
diff -u -p -r1.138 tracker.module
--- modules/tracker/tracker.module	21 Nov 2006 20:14:19 -0000	1.138
+++ modules/tracker/tracker.module	23 Nov 2006 18:02:30 -0000
@@ -77,17 +77,27 @@ 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).
+  $where = '';
+  if (isset($_REQUEST['type'])) {
+    $node_types = array_keys(node_get_types());
+    $submitted_types = explode(',', $_REQUEST['type']);
+    $node_types = array_intersect($node_types, $submitted_types);
+    $node_types = array_map('db_escape_string', $node_types);
+    $where = " 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)'. $where .' 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)'. $where;
     $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'. $where .' 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'. $where;
     $sql_count = db_rewrite_sql($sql_count);
     $result = pager_query($sql, 25, 0, $sql_count);
   }
