[dw-free] remove pre-clustering support
[commit: http://hg.dwscoalition.org/dw-free/rev/03d57001c28d]
http://bugs.dwscoalition.org/show_bug.cgi?id=1532
Remove LJ::get_newids since we don't need to support pre-clustered URLs.
Patch by
gchick.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=1532
Remove LJ::get_newids since we don't need to support pre-clustered URLs.
Patch by
Files modified:
- cgi-bin/ljlib.pl
- cgi-bin/talklib.pl
- htdocs/tools/memadd.bml
--------------------------------------------------------------------------------
diff -r 962618fe6ea5 -r 03d57001c28d cgi-bin/ljlib.pl
--- a/cgi-bin/ljlib.pl Sun Aug 30 15:20:26 2009 +0000
+++ b/cgi-bin/ljlib.pl Sun Aug 30 14:36:50 2009 -0500
@@ -337,24 +337,6 @@ sub gtop {
return $GTop ||= GTop->new;
}
-# <LJFUNC>
-# name: LJ::get_newids
-# des: Lookup an old global ID and see what journal it belongs to and its new ID.
-# info: Interface to [dbtable[oldids]] table (URL compatability)
-# returns: Undef if non-existent or unconverted, or arrayref of [$userid, $newid].
-# args: area, oldid
-# des-area: The "area" of the id. Legal values are "L" (log), to lookup an old itemid,
-# or "T" (talk) to lookup an old talkid.
-# des-oldid: The old globally-unique id of the item.
-# </LJFUNC>
-sub get_newids
-{
- my $sth;
- my $db = LJ::get_dbh("oldids") || LJ::get_db_reader();
- return $db->selectrow_arrayref("SELECT userid, newid FROM oldids ".
- "WHERE area=? AND oldid=?", undef,
- $_[0], $_[1]);
-}
# <LJFUNC>
# name: LJ::get_timeupdate_multi
diff -r 962618fe6ea5 -r 03d57001c28d cgi-bin/talklib.pl
--- a/cgi-bin/talklib.pl Sun Aug 30 15:20:26 2009 +0000
+++ b/cgi-bin/talklib.pl Sun Aug 30 14:36:50 2009 -0500
@@ -207,36 +207,7 @@ sub init
$init->{'thread'} = int($init->{'thread'} / 256)
if $init->{'thread'};
} else {
- # perhaps it's an old URL for a user that's since been clustered.
- # look up the itemid and see what user it belongs to.
- if ($form->{'itemid'}) {
- my $itemid = $form->{'itemid'}+0;
- my $newinfo = LJ::get_newids('L', $itemid);
- if ($newinfo) {
- $ju = LJ::load_userid($newinfo->[0]);
- return { 'error' => BML::ml('talk.error.nosuchjournal')} unless $ju;
- $init->{'clustered'} = 1;
- $init->{'itemid'} = $newinfo->[1];
- $init->{'oldurl'} = 1;
- if ($form->{'thread'}) {
- my $tinfo = LJ::get_newids('T', $init->{'thread'});
- $init->{'thread'} = $tinfo->[1] if $tinfo;
- }
- } else {
- return { 'error' => BML::ml('talk.error.noentry') };
- }
- } elsif ($form->{'replyto'}) {
- my $replyto = $form->{'replyto'}+0;
- my $newinfo = LJ::get_newids('T', $replyto);
- if ($newinfo) {
- $ju = LJ::load_userid($newinfo->[0]);
- return { 'error' => BML::ml('talk.error.nosuchjournal')} unless $ju;
- $init->{'replyto'} = $newinfo->[1];
- $init->{'oldurl'} = 1;
- } else {
- return { 'error' => BML::ml('talk.error.noentry') };
- }
- }
+ return { 'error' => BML::ml('talk.error.noentry') };
}
$init->{'journalu'} = $ju;
diff -r 962618fe6ea5 -r 03d57001c28d htdocs/tools/memadd.bml
--- a/htdocs/tools/memadd.bml Sun Aug 30 15:20:26 2009 +0000
+++ b/htdocs/tools/memadd.bml Sun Aug 30 14:36:50 2009 -0500
@@ -75,14 +75,6 @@
$jid = $ju->{'userid'};
$anum = $ditemid % 256;
$itemid = int($ditemid / 256);
- } else {
- # old-style item url?
- my $newids = LJ::get_newids('L', $ditemid);
- if ($newids) {
- ($jid, $itemid) = @$newids;
- $ju = LJ::load_userid($jid);
- $oldstyle = 1;
- }
}
unless ($ju && $itemid) {
--------------------------------------------------------------------------------
