diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-02-18 15:19:57 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-02-18 15:19:57 +0000 |
commit | ff9e842730ccf251cf8b76401e4df1b1c6edcea2 (patch) | |
tree | 2b10ab740305648bee997708b6d651a3816e3545 /modules/statistics | |
parent | df591c8f4032041613192e1b7836725f92ea7b10 (diff) | |
download | brdo-ff9e842730ccf251cf8b76401e4df1b1c6edcea2.tar.gz brdo-ff9e842730ccf251cf8b76401e4df1b1c6edcea2.tar.bz2 |
#330983 by recidive and boombatower: Rename users/users_roles tables to user/user_role for consistency.
Diffstat (limited to 'modules/statistics')
-rw-r--r-- | modules/statistics/statistics.admin.inc | 6 | ||||
-rw-r--r-- | modules/statistics/statistics.install | 2 | ||||
-rw-r--r-- | modules/statistics/statistics.module | 2 | ||||
-rw-r--r-- | modules/statistics/statistics.pages.inc | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/modules/statistics/statistics.admin.inc b/modules/statistics/statistics.admin.inc index d527ae4c8..763b453d4 100644 --- a/modules/statistics/statistics.admin.inc +++ b/modules/statistics/statistics.admin.inc @@ -17,7 +17,7 @@ function statistics_recent_hits() { array('data' => t('Operations')) ); - $sql = 'SELECT a.aid, a.path, a.title, a.uid, u.name, a.timestamp FROM {accesslog} a LEFT JOIN {users} u ON u.uid = a.uid' . tablesort_sql($header); + $sql = 'SELECT a.aid, a.path, a.title, a.uid, u.name, a.timestamp FROM {accesslog} a LEFT JOIN {user} u ON u.uid = a.uid' . tablesort_sql($header); $result = pager_query($sql, 30); $rows = array(); @@ -82,7 +82,7 @@ function statistics_top_visitors() { array('data' => user_access('block IP addresses') ? t('Operations') : '', 'colspan' => 2), ); - $sql = "SELECT COUNT(a.uid) AS hits, a.uid, u.name, a.hostname, SUM(a.timer) AS total, bl.iid FROM {accesslog} a LEFT JOIN {blocked_ips} bl ON a.hostname = bl.ip LEFT JOIN {users} u ON a.uid = u.uid GROUP BY a.hostname, a.uid, u.name, bl.iid" . tablesort_sql($header); + $sql = "SELECT COUNT(a.uid) AS hits, a.uid, u.name, a.hostname, SUM(a.timer) AS total, bl.iid FROM {accesslog} a LEFT JOIN {blocked_ips} bl ON a.hostname = bl.ip LEFT JOIN {user} u ON a.uid = u.uid GROUP BY a.hostname, a.uid, u.name, bl.iid" . tablesort_sql($header); $sql_cnt = "SELECT COUNT(DISTINCT(CONCAT(CAST(uid AS char), hostname))) FROM {accesslog}"; $result = pager_query($sql, 30, 0, $sql_cnt); @@ -138,7 +138,7 @@ function statistics_top_referrers() { * Menu callback; Displays recent page accesses. */ function statistics_access_log($aid) { - $result = db_query('SELECT a.*, u.name FROM {accesslog} a LEFT JOIN {users} u ON a.uid = u.uid WHERE aid = %d', $aid); + $result = db_query('SELECT a.*, u.name FROM {accesslog} a LEFT JOIN {user} u ON a.uid = u.uid WHERE aid = %d', $aid); if ($access = db_fetch_object($result)) { $rows[] = array( array('data' => t('URL'), 'header' => TRUE), diff --git a/modules/statistics/statistics.install b/modules/statistics/statistics.install index e835cf317..9c140409e 100644 --- a/modules/statistics/statistics.install +++ b/modules/statistics/statistics.install @@ -91,7 +91,7 @@ function statistics_schema() { 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0, - 'description' => 'User {users}.uid that visited the page.', + 'description' => 'User {user}.uid that visited the page.', ), 'timer' => array( 'type' => 'int', diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index edfba3994..63f3bb23b 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -232,7 +232,7 @@ function statistics_cron() { */ function statistics_title_list($dbfield, $dbrows) { if (in_array($dbfield, array('totalcount', 'daycount', 'timestamp'))) { - return db_query_range(db_rewrite_sql("SELECT n.nid, n.title, u.uid, u.name FROM {node} n INNER JOIN {node_counter} s ON n.nid = s.nid INNER JOIN {users} u ON n.uid = u.uid WHERE s." . $dbfield . " != 0 AND n.status = 1 ORDER BY s." . $dbfield . " DESC"), 0, $dbrows); + return db_query_range(db_rewrite_sql("SELECT n.nid, n.title, u.uid, u.name FROM {node} n INNER JOIN {node_counter} s ON n.nid = s.nid INNER JOIN {user} u ON n.uid = u.uid WHERE s." . $dbfield . " != 0 AND n.status = 1 ORDER BY s." . $dbfield . " DESC"), 0, $dbrows); } return FALSE; } diff --git a/modules/statistics/statistics.pages.inc b/modules/statistics/statistics.pages.inc index 612a03f34..3b0fb4c4a 100644 --- a/modules/statistics/statistics.pages.inc +++ b/modules/statistics/statistics.pages.inc @@ -15,7 +15,7 @@ function statistics_node_tracker() { array('data' => t('User'), 'field' => 'u.name'), 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); + $result = pager_query('SELECT a.aid, a.timestamp, a.url, a.uid, u.name FROM {accesslog} a LEFT JOIN {user} 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( |