? log.txt ? modules/simpletest/tests/path.test ? modules/system/system.http.inc Index: includes/bootstrap.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v retrieving revision 1.257 diff -u -p -r1.257 bootstrap.inc --- includes/bootstrap.inc 3 Dec 2008 14:51:53 -0000 1.257 +++ includes/bootstrap.inc 3 Dec 2008 19:11:50 -0000 @@ -901,7 +901,7 @@ function watchdog($type, $message, $vari '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/dblog/dblog.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/dblog/dblog.admin.inc,v retrieving revision 1.8 diff -u -p -r1.8 dblog.admin.inc --- modules/dblog/dblog.admin.inc 19 Jul 2008 07:44:45 -0000 1.8 +++ modules/dblog/dblog.admin.inc 3 Dec 2008 19:11:50 -0000 @@ -152,7 +152,7 @@ function dblog_event($id) { ), 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.install =================================================================== RCS file: /cvs/drupal/drupal/modules/dblog/dblog.install,v retrieving revision 1.10 diff -u -p -r1.10 dblog.install --- modules/dblog/dblog.install 15 Nov 2008 13:01:05 -0000 1.10 +++ modules/dblog/dblog.install 3 Dec 2008 19:11:50 -0000 @@ -74,11 +74,9 @@ function dblog_schema() { 'not null' => TRUE, 'description' => 'URL of the origin of the event.', ), - 'referer' => array( - 'type' => 'varchar', - 'length' => 128, + 'referrer' => array( + 'type' => 'text', 'not null' => FALSE, - 'default' => '', 'description' => 'URL of referring page.', ), 'hostname' => array( @@ -123,3 +121,12 @@ function dblog_update_7002() { db_add_index($ret, 'watchdog', 'uid', array('uid')); return $ret; } + +/** + * Fix misspelling of referrer and allow longer values. + */ +function dblog_update_7003() { + $ret = array(); + db_change_field($ret, 'watchdog', 'referer', 'referrer', array('type' => 'text', 'not null' => FALSE)); + return $ret; +} Index: modules/dblog/dblog.module =================================================================== RCS file: /cvs/drupal/drupal/modules/dblog/dblog.module,v retrieving revision 1.30 diff -u -p -r1.30 dblog.module --- modules/dblog/dblog.module 30 Oct 2008 09:16:01 -0000 1.30 +++ modules/dblog/dblog.module 3 Dec 2008 19:11:51 -0000 @@ -128,7 +128,7 @@ function dblog_watchdog($log = array()) '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.test =================================================================== RCS file: /cvs/drupal/drupal/modules/dblog/dblog.test,v retrieving revision 1.10 diff -u -p -r1.10 dblog.test --- modules/dblog/dblog.test 25 Nov 2008 13:14:27 -0000 1.10 +++ modules/dblog/dblog.test 3 Dec 2008 19:11:51 -0000 @@ -99,7 +99,7 @@ class DBLogTestCase extends DrupalWebTes '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/statistics/statistics.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/statistics/statistics.admin.inc,v retrieving revision 1.14 diff -u -p -r1.14 statistics.admin.inc --- modules/statistics/statistics.admin.inc 13 Oct 2008 00:33:04 -0000 1.14 +++ modules/statistics/statistics.admin.inc 3 Dec 2008 19:11:51 -0000 @@ -107,13 +107,13 @@ function statistics_top_visitors() { * 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 @@ function statistics_top_referrers() { $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 @@ function statistics_access_log($aid) { ); $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: modules/statistics/statistics.install =================================================================== RCS file: /cvs/drupal/drupal/modules/statistics/statistics.install,v retrieving revision 1.14 diff -u -p -r1.14 statistics.install --- modules/statistics/statistics.install 15 Nov 2008 13:01:09 -0000 1.14 +++ modules/statistics/statistics.install 3 Dec 2008 19:11:52 -0000 @@ -75,9 +75,8 @@ function statistics_schema() { 'not null' => FALSE, 'description' => 'Internal path to page visited (relative to Drupal root.)', ), - 'url' => array( - 'type' => 'varchar', - 'length' => 255, + 'referrer' => array( + 'type' => 'text', 'not null' => FALSE, 'description' => 'Referrer URI.', ), @@ -119,3 +118,11 @@ function statistics_schema() { return $schema; } +/** + * Rename url to referrer and allow longer values. + */ +function statistics_update_7000() { + $ret = array(); + db_change_field($ret, 'accesslog', 'url', 'referrer', array('type' => 'text', 'not null' => FALSE)); + return $ret; +} Index: modules/statistics/statistics.module =================================================================== RCS file: /cvs/drupal/drupal/modules/statistics/statistics.module,v retrieving revision 1.287 diff -u -p -r1.287 statistics.module --- modules/statistics/statistics.module 2 Dec 2008 21:24:34 -0000 1.287 +++ modules/statistics/statistics.module 3 Dec 2008 19:11:52 -0000 @@ -69,7 +69,7 @@ function statistics_exit() { 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.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/statistics/statistics.pages.inc,v retrieving revision 1.6 diff -u -p -r1.6 statistics.pages.inc --- modules/statistics/statistics.pages.inc 13 Oct 2008 00:33:04 -0000 1.6 +++ modules/statistics/statistics.pages.inc 3 Dec 2008 19:11:52 -0000 @@ -11,16 +11,16 @@ function statistics_node_tracker() { $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.test =================================================================== RCS file: /cvs/drupal/drupal/modules/statistics/statistics.test,v retrieving revision 1.5 diff -u -p -r1.5 statistics.test --- modules/statistics/statistics.test 25 Nov 2008 13:14:28 -0000 1.5 +++ modules/statistics/statistics.test 3 Dec 2008 19:11:52 -0000 @@ -17,7 +17,7 @@ class StatisticsBlockVisitorsTestCase ex $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/syslog/syslog.module =================================================================== RCS file: /cvs/drupal/drupal/modules/syslog/syslog.module,v retrieving revision 1.18 diff -u -p -r1.18 syslog.module --- modules/syslog/syslog.module 31 Aug 2008 09:15:13 -0000 1.18 +++ modules/syslog/syslog.module 3 Dec 2008 19:11:52 -0000 @@ -100,7 +100,7 @@ function theme_syslog_format($entry) { $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'])); Index: modules/system/system.api.php =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.api.php,v retrieving revision 1.2 diff -u -p -r1.2 system.api.php --- modules/system/system.api.php 3 Dec 2008 16:32:22 -0000 1.2 +++ modules/system/system.api.php 3 Dec 2008 19:11:54 -0000 @@ -719,7 +719,7 @@ function hook_xmlrpc() { * 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 use 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 @@ -762,7 +762,7 @@ function hook_watchdog($log_msg) { $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"; @@ -775,7 +775,7 @@ function hook_watchdog($log_msg) { '@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']),