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

[livejournal] r20314: LJSUP-10140 (fix calls of LJ::Lang::set_...

Committer: ailyin
LJSUP-10140 (fix calls of LJ::Lang::set_text to use the updated prototype)
U   trunk/bin/upgrading/texttool.pl
U   trunk/cgi-bin/LJ/Console/Command/FaqCat.pm
U   trunk/htdocs/admin/faq/faqedit.bml
U   trunk/htdocs/admin/faq/faqedit_do.bml
Modified: trunk/bin/upgrading/texttool.pl
===================================================================
--- trunk/bin/upgrading/texttool.pl	2011-10-14 07:21:38 UTC (rev 20313)
+++ trunk/bin/upgrading/texttool.pl	2011-10-14 07:43:05 UTC (rev 20314)
@@ -328,7 +328,7 @@
     while ( my ( $cat, $name ) = $sth->fetchrow_array ) {
         next if exists $existing{"cat.$cat"};
         my $opts = { 'childrenlatest' => 1 };
-        LJ::Lang::set_text( $dbh, $domid, $ll->{'lncode'}, "cat.$cat", $name,
+        LJ::Lang::set_text( $domid, $ll->{'lncode'}, "cat.$cat", $name,
             $opts );
     }
 
@@ -341,11 +341,11 @@
                 and exists $existing{"$faqid.2answer"}
                 and exists $existing{"$faqid.3summary"};
         my $opts = { 'childrenlatest' => 1 };
-        LJ::Lang::set_text( $dbh, $domid, $ll->{'lncode'}, "$faqid.1question",
+        LJ::Lang::set_text( $domid, $ll->{'lncode'}, "$faqid.1question",
             $q, $opts );
-        LJ::Lang::set_text( $dbh, $domid, $ll->{'lncode'}, "$faqid.2answer",
+        LJ::Lang::set_text( $domid, $ll->{'lncode'}, "$faqid.2answer",
             $a, $opts );
-        LJ::Lang::set_text( $dbh, $domid, $ll->{'lncode'}, "$faqid.3summary",
+        LJ::Lang::set_text( $domid, $ll->{'lncode'}, "$faqid.3summary",
             $s, $opts );
     }
 
@@ -905,7 +905,7 @@
     foreach my $it ( keys %{ $items{'general'} } ) {
         next if exists $e_general{$it};
         my $res =
-            LJ::Lang::set_text( $dbh, 1, "en", $it, undef,
+            LJ::Lang::set_text( 1, "en", $it, undef,
             { 'staleness' => 4 } );
         $out->("Adding general: $it ... $res");
     }
@@ -937,7 +937,7 @@
             next if exists $e_general{$it};
             next if exists $e_local{$it};
             my $res =
-                LJ::Lang::set_text( $dbh, 1, $ll->{'lncode'}, $it, undef,
+                LJ::Lang::set_text( 1, $ll->{'lncode'}, $it, undef,
                 { 'staleness' => 4 } );
             $out->("Adding local: $it ... $res");
         }

Modified: trunk/cgi-bin/LJ/Console/Command/FaqCat.pm
===================================================================
--- trunk/cgi-bin/LJ/Console/Command/FaqCat.pm	2011-10-14 07:21:38 UTC (rev 20313)
+++ trunk/cgi-bin/LJ/Console/Command/FaqCat.pm	2011-10-14 07:43:05 UTC (rev 20314)
@@ -93,7 +93,7 @@
         undef $faqd unless $rlang;
 
         if ($faqd) {
-            LJ::Lang::set_text($dbh, $faqd->{'dmid'}, $rlang->{'lncode'},
+            LJ::Lang::set_text($faqd->{'dmid'}, $rlang->{'lncode'},
                                "cat.$catkey", $catname, { 'changeseverity' => 1 });
           }
 

Modified: trunk/htdocs/admin/faq/faqedit.bml
===================================================================
--- trunk/htdocs/admin/faq/faqedit.bml	2011-10-14 07:21:38 UTC (rev 20313)
+++ trunk/htdocs/admin/faq/faqedit.bml	2011-10-14 07:43:05 UTC (rev 20314)
@@ -75,11 +75,11 @@
          my $do_trans = sub {
              my $id = shift;
              return unless $faqd;
-             LJ::Lang::set_text($dbh, $faqd->{'dmid'}, $rlang->{'lncode'},
+             LJ::Lang::set_text($faqd->{'dmid'}, $rlang->{'lncode'},
                                 "$id.1question", $question, $opts_question);
-             LJ::Lang::set_text($dbh, $faqd->{'dmid'}, $rlang->{'lncode'},
+             LJ::Lang::set_text($faqd->{'dmid'}, $rlang->{'lncode'},
                                 "$id.3summary", $summary, $opts_summary);
-             LJ::Lang::set_text($dbh, $faqd->{'dmid'}, $rlang->{'lncode'},
+             LJ::Lang::set_text($faqd->{'dmid'}, $rlang->{'lncode'},
                                 "$id.2answer", $answer, $opts_answer);
          };
 

Modified: trunk/htdocs/admin/faq/faqedit_do.bml
===================================================================
--- trunk/htdocs/admin/faq/faqedit_do.bml	2011-10-14 07:21:38 UTC (rev 20313)
+++ trunk/htdocs/admin/faq/faqedit_do.bml	2011-10-14 07:43:05 UTC (rev 20314)
@@ -68,11 +68,11 @@
  my $do_trans = sub {
      my $id = shift;
      return unless $faqd;
-     LJ::Lang::set_text($dbh, $faqd->{'dmid'}, $rlang->{'lncode'},
+     LJ::Lang::set_text($faqd->{'dmid'}, $rlang->{'lncode'},
                         "$id.1question", $FORM{'q'}, $opts_question);
-     LJ::Lang::set_text($dbh, $faqd->{'dmid'}, $rlang->{'lncode'},
+     LJ::Lang::set_text($faqd->{'dmid'}, $rlang->{'lncode'},
                         "$id.3summary", $FORM{'s'}, $opts_summary);
-     LJ::Lang::set_text($dbh, $faqd->{'dmid'}, $rlang->{'lncode'},
+     LJ::Lang::set_text($faqd->{'dmid'}, $rlang->{'lncode'},
                         "$id.2answer", $FORM{'a'}, $opts_answer);
  };
  

Tags: ailyin, andy, bml, 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