diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-02-26 07:30:29 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-02-26 07:30:29 +0000 |
commit | 665c9fdc2ca50f7960c16b375685485b3eb8b1cc (patch) | |
tree | 273088dccb033efaf0e7ed718e6041842e32c7ae /modules/statistics | |
parent | 116de1793300f2aee3d71297c26ec448f8141196 (diff) | |
download | brdo-665c9fdc2ca50f7960c16b375685485b3eb8b1cc.tar.gz brdo-665c9fdc2ca50f7960c16b375685485b3eb8b1cc.tar.bz2 |
Roll-back of users -> user table name change in #330983: Broken pgsql is no fun.
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 763b453d4..d527ae4c8 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 {user} 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 {users} 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 {user} 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 {users} 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 {user} u ON a.uid = u.uid WHERE aid = %d', $aid); + $result = db_query('SELECT a.*, u.name FROM {accesslog} a LEFT JOIN {users} 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 9c140409e..e835cf317 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 {user}.uid that visited the page.', + 'description' => 'User {users}.uid that visited the page.', ), 'timer' => array( 'type' => 'int', diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index 63f3bb23b..edfba3994 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 {user} 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 {users} 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 3b0fb4c4a..612a03f34 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 {user} 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 {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( |