diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2007-03-27 05:13:55 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2007-03-27 05:13:55 +0000 |
commit | f7440d4d73ec57219af232c135be3b2567dda45f (patch) | |
tree | a6b7d947eda1c7bfc2197bfb584f7b17143c97a5 /modules/statistics | |
parent | f2ca29071fe33603cf22f1603a3e6a61ee9c0814 (diff) | |
download | brdo-f7440d4d73ec57219af232c135be3b2567dda45f.tar.gz brdo-f7440d4d73ec57219af232c135be3b2567dda45f.tar.bz2 |
#130971: Kitchen sink (E_NOTICE compliance / Code style / Bugfix in book toc)
Diffstat (limited to 'modules/statistics')
-rw-r--r-- | modules/statistics/statistics.module | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index 9bfaf9056..d53371433 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -200,6 +200,7 @@ function statistics_node_tracker() { array('data' => t('Operations'))); $result = pager_query('SELECT a.aid, a.timestamp, a.url, a.uid, u.name FROM {accesslog} a LEFT JOIN {users} u ON a.uid = u.uid WHERE a.path LIKE \'node/%d%%\'' . tablesort_sql($header), 30, 0, NULL, $node->nid); + $rows = array(); while ($log = db_fetch_object($result)) { $rows[] = array( array('data' => format_date($log->timestamp, 'small'), 'class' => 'nowrap'), @@ -209,9 +210,11 @@ function statistics_node_tracker() { } drupal_set_title(check_plain($node->title)); - $output = theme('table', $header, $rows); - $output .= theme('pager', NULL, 30, 0); - return $output; + if (!empty($rows)) { + $output = theme('table', $header, $rows); + $output .= theme('pager', NULL, 30, 0); + return $output; + } } else { drupal_not_found(); |