Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r17325: LJSV-407 ("Date Out of Order" Option Som...

Committer: ailyin
LJSV-407 ("Date Out of Order" Option Sometimes Not Recognized);

- this should fix the problem with users every now and then getting an error 153 (Incorrect time value), even though their future-date entry is marked date out of order
- mad props to intrepia for documenting steps to reproduce this
U   trunk/cgi-bin/ljprotocol.pl
Modified: trunk/cgi-bin/ljprotocol.pl
===================================================================
--- trunk/cgi-bin/ljprotocol.pl	2010-09-09 09:58:26 UTC (rev 17324)
+++ trunk/cgi-bin/ljprotocol.pl	2010-09-09 10:14:32 UTC (rev 17325)
@@ -2113,14 +2113,14 @@
         LJ::load_user_props($u, "newesteventtime");
         if ($u->{userid} == $uowner->{userid} &&
             $u->{newesteventtime} eq $oldevent->{eventtime}) {
-            # did they change the time?
-            if ($eventtime ne $oldevent->{eventtime}) {
+            if (!$curprops{$itemid}->{opt_backdated} && $req->{props}{opt_backdated}) {
+                # if they set the backdated flag, then we no longer know
+                # the newesteventtime.
+                LJ::set_userprop($u, "newesteventtime", undef);
+            } elsif ($eventtime ne $oldevent->{eventtime}) {
+                # otherwise, if they changed time on this event,
                 # the newesteventtime is this event's new time.
                 LJ::set_userprop($u, "newesteventtime", $eventtime);
-            } elsif (!$curprops{$itemid}->{opt_backdated} && $req->{props}{opt_backdated}) {
-                # otherwise, if they set the backdated flag,
-                # then we no longer know the newesteventtime.
-                LJ::set_userprop($u, "newesteventtime", undef);
             }
         }
 

Tags: andy, livejournal, pl
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