BUG#403 User page link in Special:Contributions subtitle fails [1.4]
authorJens Frank <jeluf@users.mediawiki.org>
Tue, 7 Sep 2004 06:14:34 +0000 (06:14 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Tue, 7 Sep 2004 06:14:34 +0000 (06:14 +0000)
Disable delayed link colouring for the link in the header.

includes/SpecialContributions.php

index fd75bf5..ededb43 100644 (file)
@@ -6,12 +6,15 @@
  */
 
 /**
+ * Special page "user contributions".
+ * Shows a list of the contributions of a user.
  *
+ * @return     none
+ * @param      string  $par    (optional) user name of the user for which to show the contributions
  */
 function wfSpecialContributions( $par = '' ) {
        global $wgUser, $wgOut, $wgLang, $wgRequest;
        $fname = "wfSpecialContributions";
-       $sysop = $wgUser->isSysop();
 
        if( $par )
                $target = $par;
@@ -41,6 +44,11 @@ function wfSpecialContributions( $par = '' ) {
 
        $id = User::idFromName( $nt->getText() );
 
+       # These links are not in the body, so we can't use the delayed link colouring.
+       # Disable it and enable it again later.
+       $pPLC=$sk->postParseLinkColour();
+       $sk->postParseLinkColour( false );
+
        if ( 0 == $id ) {
                $ul = $nt->getText();
        } else {
@@ -52,6 +60,9 @@ function wfSpecialContributions( $par = '' ) {
                $ul .= " (" . $sk->makeLinkObj( $talk, $wgLang->getNsText(Namespace::getTalk(0)) ) . ")";
        }
 
+       # Enable delayed link colouring again.
+       $sk->postParseLinkColour( $pPLC );
+
        if ( $target == 'newbies' ) {
                # View the contributions of all recently created accounts
                $max = $dbr->selectField( 'user', 'max(user_id)', false, $fname );