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

[livejournal] r19905: LJSUP-9653 (ljlang refactoring)

Committer: ailyin
LJSUP-9653 (ljlang refactoring)
U   trunk/bin/upgrading/texttool.pl
U   trunk/cgi-bin/LJ/Lang.pm
Modified: trunk/bin/upgrading/texttool.pl
===================================================================
--- trunk/bin/upgrading/texttool.pl	2011-08-31 05:02:02 UTC (rev 19904)
+++ trunk/bin/upgrading/texttool.pl	2011-08-31 06:14:02 UTC (rev 19905)
@@ -665,12 +665,13 @@
                     my $staleness = $metadata{'staleness'} + 0 || 1;
 
                     my $res = LJ::Lang::set_text(
-                        $dbh, 1,
+                        1,
                         $l->{'lncode'},
                         $code, $text,
                         {   'staleness'      => $staleness,
                             'notes'          => $metadata{'notes'},
                             'changeseverity' => 2,
+                            'userid'         => 0,
                         }
                     );
 

Modified: trunk/cgi-bin/LJ/Lang.pm
===================================================================
--- trunk/cgi-bin/LJ/Lang.pm	2011-08-31 05:02:02 UTC (rev 19904)
+++ trunk/cgi-bin/LJ/Lang.pm	2011-08-31 06:14:02 UTC (rev 19905)
@@ -364,7 +364,7 @@
     my ( $dmid, $lncode, $itcode, $text, $opts ) = @_;
     load_lang_struct() unless $LS_CACHED;
 
-    my $l = $LN_CODE{$lncode} or return set_error("Language not defined.");
+    my $l = $LN_CODE{$lncode} or return set_error("Language $lncode not defined.");
     my $lnid = $l->{'lnid'};
 
     # is this domain/language request even possible?
@@ -438,7 +438,6 @@
     my $rec;
     $rec = sub {
         my $l   = shift;
-        my $rec = shift;
         foreach my $cid ( @{ $l->{'children'} } ) {
             my $clid = $LN_ID{$cid};
             if ( $opts->{'childrenlatest'} ) {
@@ -488,7 +487,7 @@
                     UPDATE ml_latest
                     SET txtid=?, revid=?
                     WHERE
-                        dmid=> AND
+                        dmid=? AND
                         lnid IN ($langids_in) AND
                         itid=? AND
                         staleness >= 3

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