Skip to content

Commit

Permalink
Track languages
Browse files Browse the repository at this point in the history
  • Loading branch information
andru committed Mar 22, 2013
1 parent ba1bedf commit 12419e0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cgi-bin/get_top_polls
Expand Up @@ -4,6 +4,7 @@ use strict;
use warnings;
use CGI qw(:standard);
use POSIX qw(strftime);
use languages;

use lib '@CGIBINDIR@';

Expand All @@ -29,6 +30,9 @@ print <IN>;


if (@LOG_HOME_VISITS@) {
my $languages = http('Accept-Language');
if (!defined($languages)) { $languages = 'unspecified-lang' }

my $remote_ip_address;
if ('@USING_ISA@') {
$remote_ip_address = http('HTTP_IPREMOTEADDR');
Expand All @@ -45,7 +49,8 @@ if (@LOG_HOME_VISITS@) {
my $civs_log = $home . '/log';
my $now = strftime "%a %b %e %H:%M:%S %Y", localtime;
open (LOG, ">>$civs_log");
print LOG "$now $remote_ip_address home-page-visit\r\n";
# print LOG "$now $remote_ip_address home-page-visit\r\n";
print LOG "$now $remote_ip_address home-page-visit $languages\r\n";
close(LOG);
}

Expand Down

0 comments on commit 12419e0

Please sign in to comment.