wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r23549: LJSUP-14752: Add country targeting for u...

Committer: wisest-owl
LJSUP-14752: Add country targeting for unlogged users

U   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);
 			});
 		},

Tags: js, livejournal, pl, wisest-owl
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments