$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;
}
'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__ );
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;
var $kblength = false;
var $missingComment = false;
var $missingSummary = false;
- var $doubleRedirect = false;
var $allowBlankSummary = false;
var $autoSumm = '';
var $hookError = '';
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) &&
$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' );
}
// 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
'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',
+++ /dev/null
--- 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
+++ /dev/null
--- Add interwiki column to redirect table
-
-ALTER TABLE /*$wgDBprefix*/redirect
- ADD rd_interwiki varchar(32) default NULL;
\ No newline at end of file
-- 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)
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' ),
);
return;
}
-