From 31800ba04cb0054ace0ec51642d2b85c2baf60dc Mon Sep 17 00:00:00 2001 From: Victor Vasiliev Date: Sat, 23 Feb 2008 10:07:50 +0000 Subject: [PATCH] Revert it back. It's already disabled on enwiki. If you need it, you can just set MediaWiki:Red-link-title to "$1". --- includes/EditPage.php | 4 ++++ includes/Linker.php | 5 ++-- maintenance/parserTests.txt | 48 ++++++++++++++++++------------------- 3 files changed, 31 insertions(+), 26 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 652aa0e1e2..45ca48d02a 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -394,6 +394,10 @@ class EditPage { wfProfileOut( __METHOD__ ); return; } else { + if( $wgRequest->getVal( 'action' ) == 'editredlink' ) { + $wgOut->redirect( $this->mTitle->getFullUrl( 'action=edit' ) ); + return; + } if ( $this->save ) { $this->formtype = 'save'; } else if ( $this->preview ) { diff --git a/includes/Linker.php b/includes/Linker.php index 18c2d43626..ea74fa527d 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -350,11 +350,12 @@ class Linker { } $u = $nt->escapeLocalURL( $q ); - $titleText = $nt->getFullText(); + $titleText = $nt->getPrefixedText(); if ( '' == $text ) { $text = htmlspecialchars( $titleText ); } - $style = $this->getInternalLinkAttributesObj( $nt, $text, 'new', $titleText ); + $titleAttr = wfMsg( 'red-link-title', $titleText ); + $style = $this->getInternalLinkAttributesObj( $nt, $text, 'new', $titleAttr ); list( $inside, $trail ) = Linker::splitTrail( $trail ); $s = "{$prefix}{$text}{$inside}{$trail}"; diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index e78fa08369..aca0e836ff 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -461,7 +461,7 @@ Definition list with wikilink containing colon !! input ; [[Help:FAQ]]: The least-read page on Wikipedia !! result -
Help:FAQ
The least-read page on Wikipedia +
Help:FAQ
The least-read page on Wikipedia
!! end @@ -887,7 +887,7 @@ External links: wiki links within external link (Bug 3695) !! input [http://example.com [[wikilink]] embedded in ext link] !! result -

wikilink embedded in ext link +

wikilink embedded in ext link

!! end @@ -1316,7 +1316,7 @@ Broken link !! input [[Zigzagzogzagzig]] !! result -

Zigzagzogzagzig +

Zigzagzogzagzig

!! end @@ -1370,7 +1370,7 @@ Link to namespaces !! input [[Talk:Parser testing]], [[Meta:Disclaimers]] !! result -

Talk:Parser testing, Meta:Disclaimers +

Talk:Parser testing, Meta:Disclaimers

!! end @@ -1379,7 +1379,7 @@ Piped link to namespace !! input [[Meta:Disclaimers|The disclaimers]] !! result -

The disclaimers +

The disclaimers

!! end @@ -1397,7 +1397,7 @@ Link containing % (not as a hex sequence) !! input [[7% Solution]] !! result -

7% Solution +

7% Solution

!! end @@ -1406,7 +1406,7 @@ Link containing % as a single hex sequence interpreted to char !! input [[7%25 Solution]] !! result -

7% Solution +

7% Solution

!!end @@ -1452,7 +1452,7 @@ Link containing double-single-quotes '' in text (bug 4598 sanity check) !! input Some [[Link|pretty ''italics'' and stuff]]! !! result -

Some pretty italics and stuff! +

Some pretty italics and stuff!

!! end @@ -1461,7 +1461,7 @@ Link containing double-single-quotes '' in text embedded in italics (bug 4598 sa !! input ''Some [[Link|pretty ''italics'' and stuff]]! !! result -

Some pretty italics and stuff! +

Some pretty italics and stuff!

!! end @@ -2084,7 +2084,7 @@ Magic links: internal link to RFC (bug 479) !! input [[RFC 123]] !! result -

RFC 123 +

RFC 123

!! end @@ -2124,7 +2124,7 @@ Nonexistant template !! input {{thistemplatedoesnotexist}} !! result -

Template:Thistemplatedoesnotexist +

Template:Thistemplatedoesnotexist

!! end @@ -2306,7 +2306,7 @@ Template with thumb image (with link in description) {{paramtest| param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}} !! result -This is a test template with parameter +This is a test template with parameter !! end @@ -3281,7 +3281,7 @@ Disabled subpages !! input [[/subpage]] !! result -

/subpage +

/subpage

!! end @@ -3292,7 +3292,7 @@ subpage title=[[Page]] !! input {{/Subpage}} !! result -

Page/Subpage +

Page/Subpage

!! end @@ -3804,7 +3804,7 @@ Image link to nonexistent file (bug 1850 - good) !! input [[:Image:No such.jpg]] !! result -

Image:No such.jpg +

Image:No such.jpg

!! end @@ -5037,7 +5037,7 @@ Transclusion of nonexistent MediaWiki message !! input {{MediaWiki:Mainpagexxx}} !!result -

MediaWiki:Mainpagexxx +

MediaWiki:Mainpagexxx

!! end @@ -5925,7 +5925,7 @@ Say the magic word
  • Talk
  • -
  • Template:Dynamic +
  • Template:Dynamic
  • !! end @@ -6050,7 +6050,7 @@ Double RFC with a wiki link !! input RFC [[RFC 1234]] !! result -

    RFC RFC 1234 +

    RFC RFC 1234

    !! end @@ -6155,7 +6155,7 @@ subpage title=[[Subpage test/L1/L2/L3]] !! input [[../|L2]] !! result -

    L2 +

    L2

    !! end @@ -6167,7 +6167,7 @@ subpage title=[[Subpage test/L1/L2/L3]] !! input [[../]] !! result -

    Subpage test/L1/L2 +

    Subpage test/L1/L2

    !! end @@ -6181,7 +6181,7 @@ subpage title=[[Subpage test/L1/L2/L3]] !! input [[../../|L1]]2 !! result -

    L1 +

    L1

    !! end @@ -6194,7 +6194,7 @@ subpage title=[[Subpage test/L1/L2/L3]] !! input [[../..]] !! result -

    ../.. +

    ../..

    !! end @@ -6207,7 +6207,7 @@ subpage title=[[Subpage test/L1/L2/L3]] !! input [[../../////]] !! result -

    Subpage test/L1 +

    Subpage test/L1

    !! end @@ -6248,7 +6248,7 @@ RAW magic word !! input {{RAW:QUERTY}} !! result -

    Template:QUERTY +

    Template:QUERTY

    !! end -- 2.20.1