vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r16458: LJSUP-5591: QotD stuff

Committer: vsukhanov
LJSUP-5591: QotD stuff
U   trunk/cgi-bin/LJ/QotD.pm
Modified: trunk/cgi-bin/LJ/QotD.pm
===================================================================
--- trunk/cgi-bin/LJ/QotD.pm	2010-03-26 05:32:50 UTC (rev 16457)
+++ trunk/cgi-bin/LJ/QotD.pm	2010-03-26 05:38:09 UTC (rev 16458)
@@ -528,19 +528,19 @@
             # for OLD questions we should display the end day as day of question
             # for CURRENT questions we display today as day of questsion.
             $_->{day} = $_->{old}
-                ? int $_->{time_end} / 86400
-                : time / 86400;
+                ? int ($_->{time_end} / 86400)
+                : int (time / 86400);
             # 
             $_;
         }
         $class->get_questions( user => $u, all => 1, domain => $domain );
 
     $question->{day} = $question->{old}
-                            ? int $question->{time_end} / 86400
-                            : time / 86400;
+                            ? int ($question->{time_end} / 86400)
+                            : int (time / 86400);
 
     my @total_this_day = 
-        grep { $_->{day} eq $question->{day} }
+        grep { $_->{day} cmp $question->{day} }
         @all_questions;
 
     my $total = scalar @total_this_day;

Tags: livejournal, pm, vadvs
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