Igor Gariev (gariev) wrote in changelog,
Igor Gariev
gariev
changelog

[ljcom] r11235: commitback from 11208 11230 11232

Committer: gariev
commitback from 11208 11230 11232
_U  branches/r87.4/
U   branches/r87.4/cgi-bin/LJ/Widget/HomepageEN.pm
U   branches/r87.4/templates/Homepage/index_en.tmpl
Property changes on: branches/r87.4
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/mobile:10279-10711
/branches/oauth:8215-9310
/trunk:11142,11144-11149,11152-11153,11156,11164,11166-11167,11169-11171,11182-11183,11187,11197,11207
   + /branches/mobile:10279-10711
/branches/oauth:8215-9310
/trunk:11142,11144-11149,11152-11153,11156,11164,11166-11167,11169-11171,11182-11183,11187,11197,11207-11208,11230,11232

Modified: branches/r87.4/cgi-bin/LJ/Widget/HomepageEN.pm
===================================================================
--- branches/r87.4/cgi-bin/LJ/Widget/HomepageEN.pm	2011-12-01 14:41:29 UTC (rev 11234)
+++ branches/r87.4/cgi-bin/LJ/Widget/HomepageEN.pm	2011-12-01 14:47:11 UTC (rev 11235)
@@ -37,6 +37,17 @@
         $result{lastupdated} = LJ::TimeUtil->ago_text($secondsago);
     }
 
+    ## Country blocks
+    $result{country} = LJ::GeoLocation->get_country_info_by_ip;
+    if ($result{country} eq 'SG' || ( $remote && $remote->prop('country') eq 'SG')) {
+        if ($GET->{sgredirect} eq 'off') {
+            LJ::Request->set_cookie('non-sg-redirect' => '1', 'expires' => time + 15552000);   
+        }
+        unless (LJ::Request->cookie('non-sg-redirect')) { 
+            LJ::Request->redirect('http://www.livejournal.sg/?sgr=1'); 
+        }
+    }
+
     ## Error Bar
     if ($GET->{returnto} || $GET->{errmsg}) {
         $result{errorbar} = '';

Modified: branches/r87.4/templates/Homepage/index_en.tmpl
===================================================================
--- branches/r87.4/templates/Homepage/index_en.tmpl	2011-12-01 14:41:29 UTC (rev 11234)
+++ branches/r87.4/templates/Homepage/index_en.tmpl	2011-12-01 14:47:11 UTC (rev 11235)
@@ -54,6 +54,7 @@
             <tmpl_var info_box>
             <tmpl_var widget_trynbuy>
             <tmpl_var widget_vgifts>
+ 			<tmpl_include expr="voteforus">
             <tmpl_var widget_updatesforuser>
             <tmpl_var widget_featuredstyles>
         </div>
@@ -127,6 +128,7 @@
 	            <tmpl_if vgift_on_homepage_unlogged_nonsup>
                     <tmpl_var widget_vgifts>
                 </tmpl_if>
+                <tmpl_include expr="voteforus">
 
                 <!-- #The block About -->
                 <div class="homepage-stats">

Tags: commitback, gariev, ljcom, pm, tmpl
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