summaryrefslogtreecommitdiff
path: root/modules/tracker
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2006-12-01 22:47:53 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2006-12-01 22:47:53 +0000
commit0ea4e1c5f638a22f7353caaa7515ebffc638e432 (patch)
tree7e8af8def0643985d92fc41b0cad96086377b09b /modules/tracker
parent7b76938b2401388f411dbf2179554ca5b449da55 (diff)
downloadbrdo-0ea4e1c5f638a22f7353caaa7515ebffc638e432.tar.gz
brdo-0ea4e1c5f638a22f7353caaa7515ebffc638e432.tar.bz2
#100563: Conditional loading of (some) module.css files
Diffstat (limited to 'modules/tracker')
-rw-r--r--modules/tracker/tracker.module7
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);