diff options
Diffstat (limited to 'modules/tracker/tracker.module')
-rw-r--r-- | modules/tracker/tracker.module | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module index e359d3ef6..28b732a69 100644 --- a/modules/tracker/tracker.module +++ b/modules/tracker/tracker.module @@ -39,10 +39,6 @@ function tracker_menu($may_cache) { } } else { - // Add the CSS for this module - // We put this in !$may_cache so it's only added once per request - drupal_add_css(drupal_get_path('module', 'tracker') .'/tracker.css'); - if (arg(0) == 'user' && is_numeric(arg(1))) { $items[] = array('path' => 'user/'. arg(1) .'/track', 'title' => t('Track'), 'callback' => 'tracker_track_user', 'access' => user_access('access content'), @@ -77,6 +73,9 @@ function tracker_track_user() { * Menu callback. Prints a listing of active nodes on the site. */ function tracker_page($uid = 0) { + // Add CSS + drupal_add_css(drupal_get_path('module', 'tracker') .'/tracker.css'); + 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 = db_rewrite_sql($sql); |