I honestly have no clue how this got committed; wasn't even using subversion. I reall...
authorChad Horohoe <demon@users.mediawiki.org>
Thu, 31 Jul 2008 02:44:56 +0000 (02:44 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Thu, 31 Jul 2008 02:44:56 +0000 (02:44 +0000)
includes/Article.php
includes/EditPage.php
languages/messages/MessagesEn.php
maintenance/archives/patch-rd_fragment.sql [deleted file]
maintenance/archives/patch-rd_interwiki.sql [deleted file]
maintenance/tables.sql
maintenance/updaters.inc

index 58abadd..a01469d 100644 (file)
@@ -103,9 +103,7 @@ class Article {
                $dbw->replace('redirect', array('rd_from'), array(
                                'rd_from' => $this->getID(),
                                'rd_namespace' => $retval->getNamespace(),
-                               'rd_title' => $retval->getDBKey(),
-                               'rd_interwiki' => $retval->getInterwiki(),
-                               'rd_fragment'  => $retval->getFragment(),
+                               'rd_title' => $retval->getDBKey()
                ), __METHOD__);
                return $retval;
        }
@@ -1184,8 +1182,6 @@ class Article {
                                        'rd_namespace' => $redirectTitle->getNamespace(),
                                        'rd_title'     => $redirectTitle->getDBkey(),
                                        'rd_from'      => $this->getId(),
-                                       'rd_interwiki' => $redirectTitle->getInterwiki(),
-                                       'rd_fragment'  => $redirectTitle->getFragment(),
                                );
 
                                $dbw->replace( 'redirect', array( 'rd_from' ), $set, __METHOD__ );
index 83aa90b..585e156 100644 (file)
@@ -41,7 +41,6 @@ class EditPage {
        const AS_SPAM_ERROR                     = 232;
        const AS_IMAGE_REDIRECT_ANON            = 233;
        const AS_IMAGE_REDIRECT_LOGGED          = 234;
-       const AS_DOUBLE_REDIRECT            = 235;
 
        var $mArticle;
        var $mTitle;
@@ -59,7 +58,6 @@ class EditPage {
        var $kblength = false;
        var $missingComment = false;
        var $missingSummary = false;
-       var $doubleRedirect = false;
        var $allowBlankSummary = false;
        var $autoSumm = '';
        var $hookError = '';
@@ -929,11 +927,6 @@ class EditPage {
                        return self::AS_HOOK_ERROR;
                }
 
-               # Are we creating a double redirect?
-               if ( $redirectTitle = Title::newFromRedirect( $this->textbox1 ) && $redirectTitle->isRedirect() ) {
-                       $this->doubleRedirect = $redirectTitle;
-               }
-
                # Handle the user preference to force summaries here, but not for null edits
                if( $this->section != 'new' && !$this->allowBlankSummary &&  $wgUser->getOption( 'forceeditsummary') && 
                        0 != strcmp($oldtext, $text) && 
@@ -1094,11 +1087,6 @@ class EditPage {
                                $wgOut->wrapWikiMsg( '<div id="mw-missingcommenttext">$1</div>',  'missingcommenttext' );
                        }
 
-                       if ( $this->doubleRedirect instanceof Title ) {
-                               $wgOut->wrapWikiMsg( '<div id="mw-creatingdoubleredirect">$1</div>', 
-                                                       array( 'creatingdoubleredirect', $this->mTitle->getText(), $this->doubleRedirect->getText() ) );
-                       }
-
                        if( $this->missingSummary && $this->section != 'new' ) {
                                $wgOut->wrapWikiMsg( '<div id="mw-missingsummary">$1</div>', 'missingsummary' );
                        }
@@ -1373,9 +1361,6 @@ END
                        // mode will show an extra newline. A bit annoying.
                        $encodedtext .= "\n";
                }
-               if ( $this->doubleRedirect instanceof Title ) {
-                       $wgOut->addHTML( Xml::hidden( 'wpIgnoreDoubleRedirect', true ) );
-               }
 
                $wgOut->addHTML( <<<END
 $recreate
index c76fe62..7f7534a 100644 (file)
@@ -1034,8 +1034,6 @@ If you click Save again, your edit will be saved without one.",
 'missingcommenttext'               => 'Please enter a comment below.',
 'missingcommentheader'             => "'''Reminder:''' You have not provided a subject/headline for this comment.
 If you click Save again, your edit will be saved without one.",
-'creatingdoubleredirect'           => "'''Caution:''' You are attempting to redirect this page to [[$1]], but it redirects to 
-[[$2]]. Redirects that redirect two or more times do not work.",
 'summary-preview'                  => 'Summary preview',
 'subject-preview'                  => 'Subject/headline preview',
 'blockedtitle'                     => 'User is blocked',
diff --git a/maintenance/archives/patch-rd_fragment.sql b/maintenance/archives/patch-rd_fragment.sql
deleted file mode 100644 (file)
index ec22854..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
--- Add fragment (section link) column to redirect table
-
-ALTER TABLE /*$wgDBprefix*/redirect
-   ADD rd_fragment varchar(255) binary DEFAULT NULL;
\ No newline at end of file
diff --git a/maintenance/archives/patch-rd_interwiki.sql b/maintenance/archives/patch-rd_interwiki.sql
deleted file mode 100644 (file)
index a99d8b4..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
--- Add interwiki column to redirect table
-
-ALTER TABLE /*$wgDBprefix*/redirect
-   ADD rd_interwiki varchar(32) default NULL;
\ No newline at end of file
index 31b47cd..11ed7cb 100644 (file)
@@ -1157,8 +1157,6 @@ CREATE TABLE /*$wgDBprefix*/redirect (
   -- goes by.
   rd_namespace int NOT NULL default '0',
   rd_title varchar(255) binary NOT NULL default '',
-  rd_interwiki varchar(32) default NULL,
-  rd_fragment varchar(255) binary DEFAULT NULL,
 
   PRIMARY KEY rd_from (rd_from),
   KEY rd_ns_title (rd_namespace,rd_title,rd_from)
index f1693a2..b121f2f 100644 (file)
@@ -143,10 +143,6 @@ $wgMysqlUpdates = array(
        array( 'maybe_do_profiling_memory_update' ),
        array( 'do_filearchive_indices_update' ),
        array( 'update_password_format' ),
-       
-       // 1.14
-       array( 'add_field', 'redirect',      'rd_interwiki',     'patch-rd_interwiki.sql' ),
-       array( 'add_field', 'redirect',      'rd_fragment',      'patch-rd_fragment.sql'  ),
 );
 
 
@@ -1720,4 +1716,3 @@ function do_postgres_updates() {
        return;
 }
 
-