Committer: sboronchiev
LJSUP-12527: Beeline branding of main page U trunk/cgi-bin/LJ/Hooks/Homepage.pm
Modified: trunk/cgi-bin/LJ/Hooks/Homepage.pm =================================================================== --- trunk/cgi-bin/LJ/Hooks/Homepage.pm 2012-06-25 11:28:09 UTC (rev 12168) +++ trunk/cgi-bin/LJ/Hooks/Homepage.pm 2012-06-25 11:38:04 UTC (rev 12169) @@ -56,14 +56,15 @@ my $remote = LJ::get_remote(); return if $remote && ($remote->get_cap('paid') || !$remote->in_class('plus')); - ## only users from Russia, Ukraine and Belorussia - return if LJ::GeoLocation->get_country_info_by_ip ne 'RU'; + my $country = LJ::GeoLocation->get_country_info_by_ip; + my $time = time(); ## beeline branding - 00.00 28 of June till 23.59 19 0f July - my $time = time(); if ($time > 1340827200 || $time > 1342727940) { - return if LJ::GeoLocation->get_country_info_by_ip ne 'UA'; - return if LJ::GeoLocation->get_country_info_by_ip ne 'BY'; + ## only users from Russia, Ukraine and Belorussia + return if not grep { $country eq $_ } qw { RU UA BY }; + } else { + return if not grep { $country eq $_ } qw { RU }; } ## only Cyr users