* Removed the hardcoding of the link parameter ($1), let the message control the destination.
* Removed the hardcoded talk page links. They can be easily re-added if desired, though, and added per-wiki.
* Removed the $3 and $4 parameters
* Fixed wfEscapeWikiText() to do "]" as well as "[", so sigs with "]" won't break links
* Updated a parser test case for the escaping change
* Add ot=raw to Special:Allmessages
* Support for Hebrew calendar
* Support for Hebrew numerals in dates and times
-* (bug 11315) Signatures can be configured in [[MediaWiki:Signature]] and [[MediaWiki:Signature-ip]]
+* (bug 11315) Signatures can be configured in [[MediaWiki:Signature]] and
+ [[MediaWiki:Signature-anon]]
* Signatures for anonymous users link to Special:Contributions page rather than user page
* Added --override switch for disabled pages in updateSpecialPages.php
*/
function wfEscapeWikiText( $text ) {
$text = str_replace(
- array( '[', '|', '\'', 'ISBN ', 'RFC ', '://', "\n=", '{{' ),
- array( '[', '|', ''', 'ISBN ', 'RFC ', '://', "\n=", '{{' ),
+ array( '[', '|', ']', '\'', 'ISBN ', 'RFC ', '://', "\n=", '{{' ),
+ array( '[', '|', ']', ''', 'ISBN ', 'RFC ', '://', "\n=", '{{' ),
htmlspecialchars($text) );
return $text;
}
$nickname = $this->cleanSigInSig( $nickname );
# If we're still here, make it a link to the user page
- $userpage = $user->getUserPage();
+ $userText = wfEscapeWikiText( $username );
+ $nickText = wfEscapeWikiText( $nickname );
if ( $user->isAnon() ) {
- $title = SpecialPage::getTitleFor('Contributions' );
- return ( wfMsgForContent( 'signature-ip',
- $title->getPrefixedText() . '/' . wfEscapeWikiText( $username ),
- wfEscapeWikiText( $nickname ),
- $userpage->getTalkPage(), wfMsgForContent('talkpagelinktext') ) );
+ return wfMsgForContent( 'signature-anon', $userText, $nickText );
} else {
- return ( wfMsgForContent( 'signature', $userpage->getPrefixedText(),
- wfEscapeWikiText( $nickname ),
- $userpage->getTalkPage(), wfMsgForContent('talkpagelinktext') ) );
+ return wfMsgForContent( 'signature', $userText, $nickText );
}
}
'hebrew-calendar-m12-gen' => 'Elul', # only translate this message to other languages if you have to change it
# Default signatures for all languages. Do not duplicate to other languages
-'signature' => '[[$1|$2]] ([[$3|$4]])', # default signature for registered users
-'signature-ip' => '[[$1|$2]] ([[$3|$4]])', # default signature for anonymous users
+'signature' => '[[User:$1|$2]]', # default signature for registered users
+'signature-anon' => '[[Special:Contributions/$1|$2]]', # default signature for anonymous users
);
'hebrew-calendar-m11-gen',
'hebrew-calendar-m12-gen',
'signature',
- 'signature-ip',
+ 'signature-anon',
);
/** EXIF messages, which may be set as optional in several checks, but are generally mandatory */
),
'signatures' => array(
'signature',
- 'signature-ip',
+ 'signature-anon',
),
);
/** Comments for each block */
!! input
{{MSGNW:msg}}
!! result
-<p>[[:Template:Msg]]
+<p>[[:Template:Msg]]
</p>
!! end