Since &nodb; is no longer there to shift out the db handles for us, 
don't pass them in in the first place. (Removes really really old code).

        Patch by fu. 

diffs (128 lines):

diff -r 011f0aefc812 -r 9ac47af78839 bin/upgrading/texttool.pl
--- a/bin/upgrading/texttool.pl Tue Jun 15 17:47:17 2010 +0800
+++ b/bin/upgrading/texttool.pl Tue Jun 15 19:52:59 2010 +0800
@@ -256,7 +256,7 @@ sub copyfaq {
     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, 
$opts);
+        LJ::Lang::set_text( $domid, $ll->{'lncode'}, "cat.$cat", $name, $opts 
);
     }
 
     # faq items
@@ -268,9 +268,9 @@ sub copyfaq {
             exists $existing{"$faqid.2answer"} and
             exists $existing{"$faqid.3summary"};
         my $opts = { childrenlatest => 1 };
-        LJ::Lang::set_text($dbh, $domid, $ll->{'lncode'}, "$faqid.1question", 
$q, $opts);
-        LJ::Lang::set_text($dbh, $domid, $ll->{'lncode'}, "$faqid.2answer", 
$a, $opts);
-        LJ::Lang::set_text($dbh, $domid, $ll->{'lncode'}, "$faqid.3summary", 
$s, $opts);
+        LJ::Lang::set_text( $domid, $ll->{'lncode'}, "$faqid.1question", $q, 
$opts );
+        LJ::Lang::set_text( $domid, $ll->{'lncode'}, "$faqid.2answer", $a, 
$opts );
+        LJ::Lang::set_text( $domid, $ll->{'lncode'}, "$faqid.3summary", $s, 
$opts );
     }
 
     $out->('-', "done.");
@@ -446,7 +446,7 @@ sub poptext {
                 # if the text is changing, the staleness is at least 1
                 my $staleness = $metadata{'staleness'}+0 || 1;
 
-                my $res = LJ::Lang::set_text($dbh, 1, $l->{'lncode'}, $code, 
$text,
+                my $res = LJ::Lang::set_text(1, $l->{'lncode'}, $code, $text,
                                              { 'staleness' => $staleness,
                                                'notes' => $metadata{'notes'},
                                                'changeseverity' => 2, });
diff -r 011f0aefc812 -r 9ac47af78839 cgi-bin/LJ/Console/Command/FaqCat.pm
--- a/cgi-bin/LJ/Console/Command/FaqCat.pm      Tue Jun 15 17:47:17 2010 +0800
+++ b/cgi-bin/LJ/Console/Command/FaqCat.pm      Tue Jun 15 19:52:59 2010 +0800
@@ -106,7 +106,7 @@ sub execute {
         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 });
           }
 
diff -r 011f0aefc812 -r 9ac47af78839 htdocs/admin/faq/faqcat.bml
--- a/htdocs/admin/faq/faqcat.bml       Tue Jun 15 17:47:17 2010 +0800
+++ b/htdocs/admin/faq/faqcat.bml       Tue Jun 15 19:52:59 2010 +0800
@@ -104,7 +104,7 @@ body<=
                 undef $faqd
                     unless $rlang;
 
-                LJ::Lang::set_text( $dbh, $faqd->{dmid}, $rlang->{lncode}, 
"cat.$faqcatname", $faqcatname, { changeseverity => 1 } )
+                LJ::Lang::set_text( $faqd->{dmid}, $rlang->{lncode}, 
"cat.$faqcatname", $faqcatname, { changeseverity => 1 } )
                   if $faqd;
 
                 $dbh->do( "REPLACE INTO faqcat
@@ -126,7 +126,7 @@ body<=
                 undef $faqd
                     unless $rlang;
 
-                LJ::Lang::set_text( $dbh, $faqd->{dmid}, $rlang->{lncode}, 
"cat.$faqcatname", $faqcatname, { changeseverity => 1 } )
+                LJ::Lang::set_text( $faqd->{dmid}, $rlang->{lncode}, 
"cat.$faqcatname", $faqcatname, { changeseverity => 1 } )
                     if $faqd;
 
                 $dbh->do( "UPDATE faqcat
diff -r 011f0aefc812 -r 9ac47af78839 htdocs/admin/faq/faqedit.bml
--- a/htdocs/admin/faq/faqedit.bml      Tue Jun 15 17:47:17 2010 +0800
+++ b/htdocs/admin/faq/faqedit.bml      Tue Jun 15 19:52:59 2010 +0800
@@ -96,13 +96,13 @@ body<=
             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 )
                     if LJ::is_enabled( 'faq_summaries' );
-                LJ::Lang::set_text( $dbh, $faqd->{dmid}, $rlang->{lncode},
+                LJ::Lang::set_text( $faqd->{dmid}, $rlang->{lncode},
                                     "$id.2answer", $answer, $opts_answer );
             };
 
diff -r 011f0aefc812 -r 9ac47af78839 htdocs/admin/priv/index.bml
--- a/htdocs/admin/priv/index.bml       Tue Jun 15 17:47:17 2010 +0800
+++ b/htdocs/admin/priv/index.bml       Tue Jun 15 19:52:59 2010 +0800
@@ -60,7 +60,7 @@ body<=
         my $userid = $remote->{userid};
         if ($dbh->do("INSERT INTO priv_map (userid, prlid, arg) SELECT ?, 
prlid, ? FROM priv_list WHERE privcode=?",
                   undef, $userid, $FORM{arg}, $FORM{priv})) {
-            LJ::statushistory_add($dbh, $userid, $userid, "privadd", "DEVMODE 
Granting: \"$FORM{priv}\" with arg \"$FORM{arg}\"");
+            LJ::statushistory_add( $userid, $userid, "privadd", "DEVMODE 
Granting: \"$FORM{priv}\" with arg \"$FORM{arg}\"" );
               return "done.";
           } else {
               return "fail.";
@@ -120,8 +120,8 @@ body<=
                         {
                             $dbh->do("DELETE FROM priv_map WHERE 
prmid=$prmid");
                             my $privcode = $priv{$prlid}->{'privcode'};
-                            LJ::statushistory_add($dbh, $del_userid1, 
$remote->{'userid'}, "privdel",
-                                               "Denying: \"$privcode\" with 
arg \"$arg\"");
+                            LJ::statushistory_add( $del_userid1, 
$remote->{'userid'}, "privdel",
+                                               "Denying: \"$privcode\" with 
arg \"$arg\"" );
                             $ret .= "Privilege removed.<br />\n";
                         }
                     }
@@ -142,7 +142,7 @@ body<=
                         } else {
                             my $qarg = $dbh->quote($arg);
                             $dbh->do("INSERT INTO priv_map (prmid, userid, 
prlid, arg) VALUES (NULL, $userid, $qpriv, $qarg)");
-                            LJ::statushistory_add($dbh, $userid, 
$remote->{'userid'}, "privadd", "Granting: \"$privcode\" with arg \"$arg\"");
+                            LJ::statushistory_add( $userid, 
$remote->{'userid'}, "privadd", "Granting: \"$privcode\" with arg \"$arg\"" );
                             $ret .= "Privilege <b>$privcode $arg</b> 
granted.<br />\n";
                         }
                     } else {
@@ -168,7 +168,7 @@ body<=
                         elsif ($userid && $privid) {
                             my $qarg = $dbh->quote($FORM{'arg'});
                             $dbh->do("INSERT INTO priv_map (prmid, userid, 
prlid, arg) VALUES (NULL, $userid, $privid, $qarg)");
-                            LJ::statushistory_add($dbh, $userid, 
$remote->{'userid'}, "privadd", "Granting: \"$privcode\" with arg 
\"$FORM{'arg'}\"");
+                            LJ::statushistory_add( $userid, 
$remote->{'userid'}, "privadd", "Granting: \"$privcode\" with arg 
\"$FORM{'arg'}\"" );
                             $ret .= "Privilege added.<br />\n";
                         }
                         else {
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to