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

[ljcom] r10275: LJSUP-8285: 1st april promo

Committer: gariev
LJSUP-8285: 1st april promo

U   trunk/cgi-bin/LJ/Hooks/Homepage.pm
Modified: trunk/cgi-bin/LJ/Hooks/Homepage.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/Homepage.pm	2011-03-22 05:02:12 UTC (rev 10274)
+++ trunk/cgi-bin/LJ/Hooks/Homepage.pm	2011-03-22 05:28:42 UTC (rev 10275)
@@ -48,29 +48,16 @@
     my $params = shift || {};
     
     my $is_sup = LJ::SUP->is_remote_sup();
+    my $time = time(); 
     
-    my ($sp_start, $sp_end);
-    
-    # my $dt = DateTime->new( year => 2011, month => 4, day => 1, hour => 0, minute => 0, second => 0, time_zone => 'Europe/Moscow');
-    # my $sp_start = $dt->epoch(); my $sp_end   = $sp_start + 86400;
-
-    # 2011-03-17 till 2011-03-17 in GMT and MSC 
-    if($is_sup) {
-        ($sp_start, $sp_end) = (1300309200, 1300395600);
-    } else {
-        ($sp_start, $sp_end) = (1300320000, 1300406400);
+    ## between 01.04.2011 00:00 MSK and 02.04.2011 00:00 MSK
+    if ($is_sup && $time > 1301601600 && $time < 1301688000) {
+        LJ::need_res("stc/reskining/2011/april/1/header.css"); 
+        return '';    
     }
-
-    if (time() >= $sp_start && time() <= $sp_end) {
-        LJ::need_res("stc/reskining/2011/march/stpd/header.css");
-        
-        my $text = LJ::Lang::ml('reskining.stpd2011');
-        LJ::CleanHTML::clean(\$text); ## to expand <lj-user> tags
-        
-        return qq[<dl class="b-reskining-about"><dt></dt><dd>$text</dd></dl>];
-    }
-    
-    if(time() < 1301601600) {
+   
+    ## 2011-04-01 00:00:00 MSK
+    if ($time < 1301601600) {
         if ($is_sup) {
             LJ::need_res("stc/reskining/2011/march/cyr/header.css"); 
             
@@ -83,9 +70,9 @@
              
             return qq[<dl class="b-reskining-about"><dt></dt><dd>$text</dd></dl>];
         }
-    } else {
-        return '';
     }
+        
+    return '';
 });
 
 LJ::register_hook("homepage_sidebar", sub {

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