diff options
Diffstat (limited to 'modules/tracker/tracker.pages.inc')
-rw-r--r-- | modules/tracker/tracker.pages.inc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/modules/tracker/tracker.pages.inc b/modules/tracker/tracker.pages.inc index 7b1e946f3..baa99866c 100644 --- a/modules/tracker/tracker.pages.inc +++ b/modules/tracker/tracker.pages.inc @@ -2,12 +2,15 @@ /** * @file - * User page callbacks for the tracker module. + * User page callbacks for tracker.module. */ /** - * Menu callback; prints a listing of active nodes on the site. + * Page callback: prints a listing of active nodes on the site. + * + * Queries the database for info, adds RDFa info if applicable, and generates + * the render array that will be used to render the page. */ function tracker_page($account = NULL, $set_title = FALSE) { if ($account) { @@ -38,23 +41,23 @@ function tracker_page($account = NULL, $set_title = FALSE) { $rows = array(); if (!empty($nodes)) { - // Now, get the data and put into the placeholder array + // Now, get the data and put into the placeholder array. $result = db_query('SELECT n.nid, n.title, n.type, n.changed, n.uid, u.name, 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 WHERE n.nid IN (:nids)', array(':nids' => array_keys($nodes)), array('target' => 'slave')); foreach ($result as $node) { $node->last_activity = $nodes[$node->nid]->changed; $nodes[$node->nid] = $node; } - // Finally display the data + // Display the data. foreach ($nodes as $node) { - // Determine the number of comments: + // Determine the number of comments. $comments = 0; if ($node->comment_count) { $comments = $node->comment_count; if ($new = comment_num_new($node->nid)) { $comments .= '<br />'; - $comments .= l(format_plural($new, '1 new', '@count new'), 'node/'. $node->nid, array('fragment' => 'new')); + $comments .= l(format_plural($new, '1 new', '@count new'), 'node/' . $node->nid, array('fragment' => 'new')); } } @@ -97,7 +100,7 @@ function tracker_page($account = NULL, $set_title = FALSE) { $row['last updated'] += $mapping_last_activity; // We need to add the about attribute on the tr tag to specify which - // node the RDFa annoatations above apply to. We move the content of + // node the RDFa annotations above apply to. We move the content of // $row to a 'data' sub array so we can specify attributes for the row. $row = array('data' => $row); $row['about'] = url('node/' . $node->nid); |