* Changed signature-ip to signature-anon
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 15 Nov 2007 03:30:03 +0000 (03:30 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 15 Nov 2007 03:30:03 +0000 (03:30 +0000)
* 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

RELEASE-NOTES
includes/GlobalFunctions.php
includes/Parser.php
languages/messages/MessagesEn.php
maintenance/language/messageTypes.inc
maintenance/language/messages.inc
maintenance/parserTests.txt

index ad2cf08..00fec8d 100644 (file)
@@ -60,7 +60,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * 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
 
index a8fbb39..008a6d2 100644 (file)
@@ -889,8 +889,8 @@ function wfCheckLimits( $deflimit = 50, $optionname = 'rclimit' ) {
  */
 function wfEscapeWikiText( $text ) {
        $text = str_replace(
-               array( '[',     '|',      '\'',    'ISBN ',     'RFC ',     '://',     "\n=",     '{{' ),
-               array( '&#91;', '&#124;', '&#39;', 'ISBN&#32;', 'RFC&#32;', '&#58;//', "\n&#61;", '&#123;&#123;' ),
+               array( '[',     '|',      ']',     '\'',    'ISBN ',     'RFC ',     '://',     "\n=",     '{{' ),
+               array( '&#91;', '&#124;', '&#93;', '&#39;', 'ISBN&#32;', 'RFC&#32;', '&#58;//', "\n&#61;", '&#123;&#123;' ),
                htmlspecialchars($text) );
        return $text;
 }
index 0ad8b82..46687e6 100644 (file)
@@ -3878,17 +3878,12 @@ class Parser
                $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 );
                }
        }
 
index 735a5ff..c40117d 100644 (file)
@@ -3045,7 +3045,7 @@ $1',
 '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
 
 );
index 5bb967d..6baf302 100644 (file)
@@ -255,7 +255,7 @@ $wgOptionalMessages = array(
        '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 */
index c01f4e3..3343ed5 100644 (file)
@@ -2272,7 +2272,7 @@ $wgMessageStructure = array(
        ),
        'signatures' => array(
                'signature',
-               'signature-ip',
+               'signature-anon',
        ),
 );
 /** Comments for each block */
index 9b5d973..8e84e96 100644 (file)
@@ -6251,7 +6251,7 @@ MSGNW magic word
 !! input
 {{MSGNW:msg}}
 !! result
-<p>&#91;&#91;:Template:Msg]]
+<p>&#91;&#91;:Template:Msg&#93;&#93;
 </p>
 !! end