Committer: wisest-owl
LJSUP-14752: Add country targeting for unlogged usersU trunk/cgi-bin/weblib.pl U trunk/htdocs/js/basic.js
Modified: trunk/cgi-bin/weblib.pl =================================================================== --- trunk/cgi-bin/weblib.pl 2013-01-16 12:16:26 UTC (rev 23548) +++ trunk/cgi-bin/weblib.pl 2013-01-16 13:20:59 UTC (rev 23549) @@ -1620,6 +1620,7 @@ $comm_access{'membership'} = $c_acc[0] if scalar @c_acc; } + my (undef, $country) = LJ::GeoLocation->ip_class (); my $ljentry = LJ::Request->notes('ljentry') || ''; # url my %site = ( imgprefix => "$imgprefix", @@ -1647,6 +1648,7 @@ locale => $locale, pics_production => LJ::is_enabled('pics_production'), v => stc_0_modtime($now), + country => $country, %comm_access, ); $site{default_copyright} = $default_copyright if LJ::is_enabled('default_copyright', $remote); Modified: trunk/htdocs/js/basic.js =================================================================== --- trunk/htdocs/js/basic.js 2013-01-16 12:16:26 UTC (rev 23548) +++ trunk/htdocs/js/basic.js 2013-01-16 13:20:59 UTC (rev 23549) @@ -1766,7 +1766,7 @@ get: function () { var that = this; - LJ.Api.call('sitemessage.get_message', { locale: Site.locale }, function (content) { + LJ.Api.call('sitemessage.get_message', { locale: Site.locale, country: Site.country }, function (content) { that.show(content); }); },