Committer: akanashin
LJSUP-10750: Singapore redirecting improvementsU trunk/bin/upgrading/proplists-local.dat U trunk/cgi-bin/LJ/Widget/HomepageEN.pm
Modified: trunk/bin/upgrading/proplists-local.dat =================================================================== --- trunk/bin/upgrading/proplists-local.dat 2011-12-15 18:58:21 UTC (rev 11266) +++ trunk/bin/upgrading/proplists-local.dat 2011-12-16 09:38:02 UTC (rev 11267) @@ -835,6 +835,13 @@ des: Enable Ukraine or Default (Russian) ratings. indexed: 0 +userproplist.disable_sg_redirect: + cldversion: 8 + datatype: bool + prettyname: Disable redirect to Singapore + des: Disable redirect from www.livejournal.com to www.livejournal.sg + indexed: 0 + userproplist.fotki_migrated_photos: datatype: char cldversion: 8 Modified: trunk/cgi-bin/LJ/Widget/HomepageEN.pm =================================================================== --- trunk/cgi-bin/LJ/Widget/HomepageEN.pm 2011-12-15 18:58:21 UTC (rev 11266) +++ trunk/cgi-bin/LJ/Widget/HomepageEN.pm 2011-12-16 09:38:02 UTC (rev 11267) @@ -39,9 +39,10 @@ ## Country blocks $result{country} = LJ::GeoLocation->get_country_info_by_ip; - if ($result{country} eq 'SG' || ( $remote && $remote->prop('country') eq 'SG')) { + if ($result{country} eq 'SG' || ( $remote && $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); + LJ::Request->set_cookie('non-sg-redirect' => '1', 'expires' => time + 15552000); + $remote->set_prop('disable_sg_redirect', 1) if $remote; } unless (LJ::Request->cookie('non-sg-redirect')) { LJ::Request->redirect('http://www.livejournal.sg/?sgr=1');