Index: modules/dblog/dblog.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.admin.inc,v
retrieving revision 1.8
diff -u -r1.8 dblog.admin.inc
--- modules/dblog/dblog.admin.inc	19 Jul 2008 07:44:45 -0000	1.8
+++ modules/dblog/dblog.admin.inc	11 Dec 2008 08:39:55 -0000
@@ -152,7 +152,7 @@
       ),
       array(
         array('data' => t('Referrer'), 'header' => TRUE),
-        l($dblog->referer, $dblog->referer),
+        l($dblog->referrer, $dblog->referrer),
       ),
       array(
         array('data' => t('Message'), 'header' => TRUE),
Index: modules/dblog/dblog.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.test,v
retrieving revision 1.11
diff -u -r1.11 dblog.test
--- modules/dblog/dblog.test	5 Dec 2008 22:18:44 -0000	1.11
+++ modules/dblog/dblog.test	11 Dec 2008 08:39:56 -0000
@@ -99,7 +99,7 @@
       'link'        => NULL,
       'user'        => $this->big_user,
       'request_uri' => $base_root . request_uri(),
-      'referer'     => $_SERVER['HTTP_REFERER'],
+      'referrer'    => $_SERVER['HTTP_REFERER'],
       'ip'          => ip_address(),
       'timestamp'   => REQUEST_TIME,
       );
Index: modules/dblog/dblog.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.module,v
retrieving revision 1.30
diff -u -r1.30 dblog.module
--- modules/dblog/dblog.module	30 Oct 2008 09:16:01 -0000	1.30
+++ modules/dblog/dblog.module	11 Dec 2008 08:39:55 -0000
@@ -128,7 +128,7 @@
       'severity' => $log['severity'],
       'link' => $log['link'],
       'location' => $log['request_uri'],
-      'referer' => $log['referer'],
+      'referrer' => $log['referrer'],
       'hostname' => $log['ip'],
       'timestamp' => $log['timestamp'],
     ))
Index: modules/dblog/dblog.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.install,v
retrieving revision 1.11
diff -u -r1.11 dblog.install
--- modules/dblog/dblog.install	3 Dec 2008 19:22:09 -0000	1.11
+++ modules/dblog/dblog.install	11 Dec 2008 08:39:55 -0000
@@ -74,7 +74,7 @@
         'not null' => TRUE,
         'description' => 'URL of the origin of the event.',
       ),
-      'referer' => array(
+      'referrer' => array(
         'type' => 'text',
         'not null' => FALSE,
         'description' => 'URL of referring page.',
@@ -104,7 +104,7 @@
 }
 
 /**
- * Allow NULL values for links and longer referers.
+ * Allow NULL values for links and longer referrers.
  */
 function dblog_update_7001() {
   $ret = array();
@@ -121,3 +121,12 @@
   db_add_index($ret, 'watchdog', 'uid', array('uid'));
   return $ret;
 }
+
+/**
+ * Fix misspelling of 'referrer'
+ */
+function dblog_update_7003() {
+  $ret = array();
+  db_change_field($ret, 'watchdog', 'referer', 'referrer', array('type' => 'text', 'not null' => FALSE));
+  return $ret;
+}
Index: modules/system/system.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.api.php,v
retrieving revision 1.3
diff -u -r1.3 system.api.php
--- modules/system/system.api.php	9 Dec 2008 11:36:03 -0000	1.3
+++ modules/system/system.api.php	11 Dec 2008 08:39:56 -0000
@@ -720,7 +720,7 @@
  *     normally the module name. Do not use 'debug', use severity WATCHDOG_DEBUG instead.
  *   - user: The user object for the user who was logged in when the event happened.
  *   - request_uri: The Request URI for the page the event happened in.
- *   - referer: The page that referred the use to the page where the event occurred.
+ *   - referrer: The page that referred the user to the page where the event occurred.
  *   - ip: The IP address where the request for the page came from.
  *   - timestamp: The UNIX timetamp of the date/time the event occurred
  *   - severity: One of the following values as defined in RFC 3164 http://www.faqs.org/rfcs/rfc3164.html
@@ -763,7 +763,7 @@
   $message .= "\nType:         @type";
   $message .= "\nIP Address:   @ip";
   $message .= "\nRequest URI:  @request_uri";
-  $message .= "\nReferrer URI: @referer_uri";
+  $message .= "\nReferrer URI: @referrer_uri";
   $message .= "\nUser:         (@uid) @name";
   $message .= "\nLink:         @link";
   $message .= "\nMessage:      \n\n@message";
@@ -776,7 +776,7 @@
     '@type'          => $log_msg['type'],
     '@ip'            => $log_msg['ip'],
     '@request_uri'   => $log_msg['request_uri'],
-    '@referer_uri'   => $log_msg['referer'],
+    '@referrer_uri'  => $log_msg['referrer'],
     '@uid'           => $log_msg['user']->uid,
     '@name'          => $log_msg['user']->name,
     '@link'          => strip_tags($log_msg['link']),
Index: modules/statistics/statistics.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.test,v
retrieving revision 1.5
diff -u -r1.5 statistics.test
--- modules/statistics/statistics.test	25 Nov 2008 13:14:28 -0000	1.5
+++ modules/statistics/statistics.test	11 Dec 2008 08:39:56 -0000
@@ -17,7 +17,7 @@
     $this->blocking_user = $this->drupalCreateUser(array('block IP addresses', 'access statistics'));
 
     // Insert dummy access by anonymous user into access log.
-    db_query("INSERT INTO {accesslog} (title, path, url, hostname, uid, sid, timer, timestamp) values('%s', '%s', '%s', '%s', %d, '%s', %d, %d)", 'test', 'node/1', 'http://example.com', '192.168.1.1', '0', '10', '10', REQUEST_TIME);
+    db_query("INSERT INTO {accesslog} (title, path, referrer, hostname, uid, sid, timer, timestamp) values('%s', '%s', '%s', '%s', %d, '%s', %d, %d)", 'test', 'node/1', 'http://example.com', '192.168.1.1', '0', '10', '10', REQUEST_TIME);
   }
 
   /**
Index: modules/statistics/statistics.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.module,v
retrieving revision 1.288
diff -u -r1.288 statistics.module
--- modules/statistics/statistics.module	9 Dec 2008 11:30:25 -0000	1.288
+++ modules/statistics/statistics.module	11 Dec 2008 08:39:56 -0000
@@ -69,7 +69,7 @@
     db_insert('accesslog')->fields(array(
       'title' => strip_tags(drupal_get_title()),
       'path' => $_GET['q'],
-      'url' => $_SERVER['HTTP_REFERER'],
+      'referrer' => $_SERVER['HTTP_REFERER'],
       'hostname' => ip_address(),
       'uid' => $user->uid,
       'sid' => session_id(),
Index: modules/statistics/statistics.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.install,v
retrieving revision 1.15
diff -u -r1.15 statistics.install
--- modules/statistics/statistics.install	3 Dec 2008 19:22:09 -0000	1.15
+++ modules/statistics/statistics.install	11 Dec 2008 08:39:56 -0000
@@ -75,7 +75,7 @@
         'not null' => FALSE,
         'description' => 'Internal path to page visited (relative to Drupal root.)',
       ),
-      'url' => array(
+      'referrer' => array(
         'type' => 'text',
         'not null' => FALSE,
         'description' => 'Referrer URI.',
@@ -126,3 +126,12 @@
   db_change_field($ret, 'accesslog', 'url', 'url', array('type' => 'text', 'not null' => FALSE));
   return $ret;
 }
+
+/**
+ * Rename 'url' to 'referrer'.
+ */
+function statistics_update_7001() {
+  $ret = array();
+  db_change_field($ret, 'accesslog', 'referer', 'referrer', array('type' => 'text', 'not null' => FALSE));
+  return $ret;
+}
Index: modules/statistics/statistics.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.pages.inc,v
retrieving revision 1.6
diff -u -r1.6 statistics.pages.inc
--- modules/statistics/statistics.pages.inc	13 Oct 2008 00:33:04 -0000	1.6
+++ modules/statistics/statistics.pages.inc	11 Dec 2008 08:39:56 -0000
@@ -11,16 +11,16 @@
 
     $header = array(
         array('data' => t('Time'), 'field' => 'a.timestamp', 'sort' => 'desc'),
-        array('data' => t('Referrer'), 'field' => 'a.url'),
+        array('data' => t('Referrer'), 'field' => 'a.referrer'),
         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.referrer, 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'),
-        _statistics_link($log->url),
+        _statistics_link($log->referrer),
         theme('username', $log),
         l(t('details'), "admin/reports/access/$log->aid"));
     }
Index: modules/statistics/statistics.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.admin.inc,v
retrieving revision 1.14
diff -u -r1.14 statistics.admin.inc
--- modules/statistics/statistics.admin.inc	13 Oct 2008 00:33:04 -0000	1.14
+++ modules/statistics/statistics.admin.inc	11 Dec 2008 08:39:56 -0000
@@ -107,13 +107,13 @@
  * Menu callback; presents the "referrer" page.
  */
 function statistics_top_referrers() {
-  $query = "SELECT url, COUNT(url) AS hits, MAX(timestamp) AS last FROM {accesslog} WHERE url NOT LIKE :host AND url <> '' GROUP BY url";
-  $query_cnt = "SELECT COUNT(DISTINCT(url)) FROM {accesslog} WHERE url <> '' AND url NOT LIKE :host";
+  $query = "SELECT referrer, COUNT(referrer) AS hits, MAX(timestamp) AS last FROM {accesslog} WHERE referrer NOT LIKE :host AND referrer <> '' GROUP BY referrer";
+  $query_cnt = "SELECT COUNT(DISTINCT(referrer)) FROM {accesslog} WHERE referrer <> '' AND referrer NOT LIKE :host";
   drupal_set_title(t('Top referrers in the past %interval', array('%interval' => format_interval(variable_get('statistics_flush_accesslog_timer', 259200)))), PASS_THROUGH);
 
   $header = array(
     array('data' => t('Hits'), 'field' => 'hits', 'sort' => 'desc'),
-    array('data' => t('Url'), 'field' => 'url'),
+    array('data' => t('Url'), 'field' => 'referrer'),
     array('data' => t('Last visit'), 'field' => 'last'),
   );
 
@@ -122,7 +122,7 @@
 
   $rows = array();
   while ($referrer = db_fetch_object($result)) {
-    $rows[] = array($referrer->hits, _statistics_link($referrer->url), t('@time ago', array('@time' => format_interval(REQUEST_TIME - $referrer->last))));
+    $rows[] = array($referrer->hits, _statistics_link($referrer->referrer), t('@time ago', array('@time' => format_interval(REQUEST_TIME - $referrer->last))));
   }
 
   if (empty($rows)) {
@@ -152,7 +152,7 @@
     );
     $rows[] = array(
       array('data' => t('Referrer'), 'header' => TRUE),
-      ($access->url ? l($access->url, $access->url) : '')
+      ($access->referrer ? l($access->referrer, $access->referrer) : '')
     );
     $rows[] = array(
       array('data' => t('Date'), 'header' => TRUE),
Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.257
diff -u -r1.257 bootstrap.inc
--- includes/bootstrap.inc	3 Dec 2008 14:51:53 -0000	1.257
+++ includes/bootstrap.inc	11 Dec 2008 08:39:55 -0000
@@ -901,7 +901,7 @@
       'link'        => $link,
       'user'        => $user,
       'request_uri' => $base_root . request_uri(),
-      'referer'     => $_SERVER['HTTP_REFERER'],
+      'referrer'    => $_SERVER['HTTP_REFERER'],
       'ip'          => ip_address(),
       'timestamp'   => REQUEST_TIME,
     );
Index: modules/syslog/syslog.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/syslog/syslog.module,v
retrieving revision 1.18
diff -u -r1.18 syslog.module
--- modules/syslog/syslog.module	31 Aug 2008 09:15:13 -0000	1.18
+++ modules/syslog/syslog.module	11 Dec 2008 08:39:56 -0000
@@ -100,7 +100,7 @@
   $message .= '|' . $entry['type'];
   $message .= '|' . $entry['ip'];
   $message .= '|' . $entry['request_uri'];
-  $message .= '|' . $entry['referer'];
+  $message .= '|' . $entry['referrer'];
   $message .= '|' . $entry['user']->uid;
   $message .= '|' . strip_tags($entry['link']);
   $message .= '|' . strip_tags(is_null($entry['variables']) ? $entry['message'] : strtr($entry['message'], $entry['variables']));
