--- sites/all/modules/votingapi/views/votingapi_views_handler_relationship.inc 2009-08-15 13:58:06.000000000 -0400 +++ sites/all/modules/votingapi/views/votingapi_views_handler_relationship.inc.NEW 2009-09-30 14:15:52.000000000 -0400 @@ -160,6 +160,8 @@ class votingapi_views_handler_relationsh * Called to implement a relationship in a query. */ function query() { + global $user; + // Figure out what base table this relationship brings to the party. $table_data = views_fetch_data($this->definition['base']); @@ -201,6 +203,13 @@ class votingapi_views_handler_relationsh 'value' => '***CURRENT_USER***', 'numeric' => FALSE ); + if ($user->uid == 0) { + $def['extra'][] = array( + 'field' => 'vote_source', + 'value' => ip_address(), + 'numeric' => FALSE + ); + } $alias .= '_curuser'; }