afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-08-03 03:16 pm

[dw-free] remove LJ::alldatepart_s1

[commit: http://hg.dwscoalition.org/dw-free/rev/cdcc2fdcdaf2]

http://bugs.dwscoalition.org/show_bug.cgi?id=1534

Remove; replace with an error message in case we end up on the s1 path
(should not happen!)

Patch by [personal profile] kareila.

Files modified:
  • cgi-bin/LJ/Entry.pm
  • cgi-bin/ljtimeutil.pl
--------------------------------------------------------------------------------
diff -r db8ab31f7439 -r cdcc2fdcdaf2 cgi-bin/LJ/Entry.pm
--- a/cgi-bin/LJ/Entry.pm	Mon Aug 03 15:13:59 2009 +0000
+++ b/cgi-bin/LJ/Entry.pm	Mon Aug 03 15:16:25 2009 +0000
@@ -1700,7 +1700,7 @@ sub get_log2_recent_user
             my $logtime = LJ::mysql_time($LJ::EndOfTime - $item->{rlogtime}, 1);
             $item->{'system_alldatepart'} = LJ::alldatepart_s2($logtime);
         } else {
-            $item->{'alldatepart'} = LJ::alldatepart_s1($item->{'eventtime'});
+            confess "We removed S1 support, sorry.";
         }
         push @$ret, $item;
     }
diff -r db8ab31f7439 -r cdcc2fdcdaf2 cgi-bin/ljtimeutil.pl
--- a/cgi-bin/ljtimeutil.pl	Mon Aug 03 15:13:59 2009 +0000
+++ b/cgi-bin/ljtimeutil.pl	Mon Aug 03 15:16:25 2009 +0000
@@ -151,42 +151,6 @@ sub mysql_time
 }
 
 # <LJFUNC>
-# name: LJ::alldatepart_s1
-# des: Gets date in MySQL format, produces s1dateformat.
-# class: time
-# args:
-# des-:
-# info: s1 dateformat is: "%a %W %b %M %y %Y %c %m %e %d %D %p %i %l %h %k %H"
-#       Sample string: Tue Tuesday Sep September 03 2003 9 09 30 30 30th AM 22 9 09 9 09.
-#       Thu Thursday Oct October 03 2003 10 10 2 02 2nd AM 33 9 09 9 09
-# returns:
-# </LJFUNC>
-sub alldatepart_s1
-{
-    my $time = shift;
-    my ($sec,$min,$hour,$mday,$mon,$year,$wday) =
-        gmtime(LJ::mysqldate_to_time($time, 1));
-    my $ret = "";
-
-    $ret .= LJ::Lang::day_short($wday+1) . " " .
-      LJ::Lang::day_long($wday+1) . " " .
-      LJ::Lang::month_short($mon+1) . " " .
-      LJ::Lang::month_long($mon+1) . " " .
-      sprintf("%02d %04d %d %02d %d %02d %d%s ",
-              $year % 100, $year + 1900, $mon+1, $mon+1,
-              $mday, $mday, $mday, LJ::Lang::day_ord($mday));
-    $ret .= $hour < 12 ? "AM " : "PM ";
-    $ret .= sprintf("%02d %d %02d %d %02d", $min,
-                    ($hour+11)%12 + 1,
-                    ($hour+ 11)%12 +1,
-                    $hour,
-                    $hour);
-
-    return $ret;
-}
-
-
-# <LJFUNC>
 # name: LJ::alldatepart_s2
 # des: Gets date in MySQL format, produces s2dateformat.
 # class: time
--------------------------------------------------------------------------------