[ljcom] r11338: LJSUP-11027: Automatic redirection to li...
Committer: akanashin
LJSUP-11027: Automatic redirection to livejournal.sg for users who don't want it U trunk/cgi-bin/LJ/Widget/HomepageEN.pm
Modified: trunk/cgi-bin/LJ/Widget/HomepageEN.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/HomepageEN.pm 2012-01-20 12:56:01 UTC (rev 11337)
+++ trunk/cgi-bin/LJ/Widget/HomepageEN.pm 2012-01-23 09:56:55 UTC (rev 11338)
@@ -38,7 +38,7 @@
## Country blocks
$result{country} = LJ::GeoLocation->get_country_info_by_ip;
- if ($result{country} eq 'SG' || ( $remote && $remote->prop('country') eq 'SG' && !$remote->prop('disable_sg_redirect'))) {
+ if ((!$remote && $result{country} eq 'SG') || ( $remote && ($result{country} eq 'SG' || $remote->prop('country') eq 'SG')) && !$remote->prop('disable_sg_redirect')) {
if ($GET->{sgredirect} eq 'off') {
LJ::Request->set_cookie('non-sg-redirect' => '1', 'expires' => time + 15552000);
$remote->set_prop('disable_sg_redirect', 1) if $remote;
