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-09-01 06:27 pm

[dw-free] Drop tables adopt and adoptlast, which aren't use anywhere in the code

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

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

Remove urimap (beginnings of a feature which was never completed)

Patch by [personal profile] kareila.

Files modified:
  • bin/upgrading/base-data.sql
  • bin/upgrading/update-db-general.pl
  • cgi-bin/Apache/LiveJournal.pm
  • cgi-bin/ljlib.pl
--------------------------------------------------------------------------------
diff -r 814a795fdb51 -r 2422fd729e2a bin/upgrading/base-data.sql
--- a/bin/upgrading/base-data.sql	Tue Sep 01 18:15:05 2009 +0000
+++ b/bin/upgrading/base-data.sql	Tue Sep 01 18:25:50 2009 +0000
@@ -782,7 +782,6 @@ REPLACE INTO schematables (des, public_b
 REPLACE INTO schematables (des, public_browsable, redist_mode, redist_where, tablename) VALUES ('Clustered. Stores contextual product prodding history. This makes sure people are not pestered by specific prodding when they do not want it anymore.', '0', 'off', NULL, 'cprod');
 REPLACE INTO schematables (des, public_browsable, redist_mode, redist_where, tablename) VALUES ('Clustered. Stores data about entries for the random user search. On posting an entry (public, to personal journal, and not opted out (using latest_optout option at the console)) a user may end up with a row in this table.\n\r\nThe htdocs/random.bml page returns a random user that is both 1) publicly listed in the directory, and 2) updated within the past 24 hours. If a user changes their privacy setting using the console to not be in this table, it will take up to 24 hours for them to be removed from the random.bml listing; a maintenance task builds/cleans the table.\r\n\r\nThe information row is kept for seven days by default. Site administrators can adjust this using the $LJ::RANDOM_USER_PERIOD site variable.', '0', 'off', NULL, 'random_user_set');
 REPLACE INTO schematables (des, public_browsable, redist_mode, redist_where, tablename) VALUES ('Clustered. Stores data for links users place in their Links List (“blogroll”), used in S2 styles.', '0', 'off', NULL, 'links');
-REPLACE INTO schematables (des, public_browsable, redist_mode, redist_where, tablename) VALUES ('Clustered. Stores data for mapping a named URI permalink - that is: http://somejournal.example.com/this_is_a_named_uri.html (not-yet-implemented), to the respective entry.', '0', 'off', NULL, 'urimap');
 REPLACE INTO schematables (des, public_browsable, redist_mode, redist_where, tablename) VALUES ('Clustered. Stores data for mapping an entry to its security filtering.\n\r\nA row is added here whenever an entry with security of \"usemask\" (which is Friends-only and Custom) is posted.\r\n\r\nUsed for speedier deleting of a friend group, which was slow since old entries needed the bit turned off in allowmask.', '0', 'off', NULL, 'logsec2');
 REPLACE INTO schematables (des, public_browsable, redist_mode, redist_where, tablename) VALUES ('Clustered. Stores data for mapping memories to keywords.', '0', 'off', NULL, 'memkeyword2');
 REPLACE INTO schematables (des, public_browsable, redist_mode, redist_where, tablename) VALUES ('Clustered. Stores data for mapping of tags applied to an entry.', '0', 'off', NULL, 'logtags');
diff -r 814a795fdb51 -r 2422fd729e2a bin/upgrading/update-db-general.pl
--- a/bin/upgrading/update-db-general.pl	Tue Sep 01 18:15:05 2009 +0000
+++ b/bin/upgrading/update-db-general.pl	Tue Sep 01 18:25:50 2009 +0000
@@ -973,6 +973,7 @@ register_tabledrop("zips");
 register_tabledrop("zips");
 register_tabledrop("adopt");
 register_tabledrop("adoptlast");
+register_tabledrop("urimap");
 
 register_tablecreate("portal", <<'EOC');
 CREATE TABLE portal (
@@ -2463,18 +2464,6 @@ CREATE TABLE comm_promo_list (
 )
 EOC
 
-register_tablecreate("urimap", <<'EOC');
-CREATE TABLE urimap (
-    journalid   INTEGER UNSIGNED NOT NULL,
-    uri         VARCHAR(255) BINARY NOT NULL,
-    PRIMARY KEY (journalid, uri),
-    nodetype    CHAR(1) NOT NULL,
-    nodeid      INTEGER UNSIGNED NOT NULL,
-
-    INDEX       (journalid, nodetype, nodeid)
-)
-EOC
-
 register_tablecreate("jabroster", <<'EOC');
 CREATE TABLE jabroster (
     userid     INT UNSIGNED NOT NULL,
diff -r 814a795fdb51 -r 2422fd729e2a cgi-bin/Apache/LiveJournal.pm
--- a/cgi-bin/Apache/LiveJournal.pm	Tue Sep 01 18:15:05 2009 +0000
+++ b/cgi-bin/Apache/LiveJournal.pm	Tue Sep 01 18:25:50 2009 +0000
@@ -752,20 +752,6 @@ sub trans
             $key =~ s!^/!!;
             my $u = LJ::load_user($user)
                 or return 404;
-
-            my ($type, $nodeid) =
-                LJ::is_enabled('named_permalinks') ?
-                $u->selectrow_array("SELECT nodetype, nodeid FROM urimap WHERE journalid=? AND uri=?",
-                                    undef, $u->{userid}, $key) : ();
-            if ($type eq "L") {
-                $ljentry = LJ::Entry->new($u, ditemid => $nodeid);
-                if ($GET{'mode'} eq "reply" || $GET{'replyto'} || $GET{'edit'}) {
-                    $mode = "reply";
-                } else {
-                    $mode = "entry";
-                }
-            }
-
         }
 
         return undef unless defined $mode;
diff -r 814a795fdb51 -r 2422fd729e2a cgi-bin/ljlib.pl
--- a/cgi-bin/ljlib.pl	Tue Sep 01 18:15:05 2009 +0000
+++ b/cgi-bin/ljlib.pl	Tue Sep 01 18:25:50 2009 +0000
@@ -89,7 +89,7 @@ sub END { LJ::end_request(); }
                     "logtags", "logtagsrecent", "logkwsum",
                     "recentactions", "usertags", "pendcomments",
                     "user_schools", "loginlog", "active_user", "userblobcache",
-                    "notifyqueue", "cprod", "urimap",
+                    "notifyqueue", "cprod",
                     "jabroster", "jablastseen", "random_user_set",
                     "poll2", "pollquestion2", "pollitem2",
                     "pollresult2", "pollsubmission2",
--------------------------------------------------------------------------------