From 5d87d7d6b785a1a24294ae84a5029504ce5067d9 Mon Sep 17 00:00:00 2001 From: Alex Z Date: Wed, 17 Jun 2009 06:59:27 +0000 Subject: [PATCH] Partial fix for bug 19236 - the array you want to override others should come last in array_merge(). This fixes the "next" links, limit links, and filters. The "previous" links are still broken. --- includes/specials/SpecialWhatlinkshere.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/specials/SpecialWhatlinkshere.php b/includes/specials/SpecialWhatlinkshere.php index af1115fa3e..6c0ceee20c 100644 --- a/includes/specials/SpecialWhatlinkshere.php +++ b/includes/specials/SpecialWhatlinkshere.php @@ -334,18 +334,18 @@ class SpecialWhatLinksHere extends SpecialPage { if ( 0 != $prevId ) { $overrides = array( 'from' => $this->opts->getValue( 'back' ) ); - $prev = $this->makeSelfLink( $prev, array_merge( $overrides, $changed ) ); + $prev = $this->makeSelfLink( $prev, array_merge( $changed, $overrides ) ); } if ( 0 != $nextId ) { $overrides = array( 'from' => $nextId, 'back' => $prevId ); - $next = $this->makeSelfLink( $next, array_merge( $overrides, $changed ) ); + $next = $this->makeSelfLink( $next, array_merge( $changed, $overrides ) ); } $limitLinks = array(); foreach ( $this->limits as $limit ) { $prettyLimit = $wgLang->formatNum( $limit ); $overrides = array( 'limit' => $limit ); - $limitLinks[] = $this->makeSelfLink( $prettyLimit, array_merge( $overrides, $changed ) ); + $limitLinks[] = $this->makeSelfLink( $prettyLimit, array_merge( $changed, $overrides ) ); } $nums = $wgLang->pipeList( $limitLinks ); @@ -412,7 +412,7 @@ class SpecialWhatLinksHere extends SpecialPage { $chosen = $this->opts->getValue( $type ); $msg = wfMsgHtml( "whatlinkshere-{$type}", $chosen ? $show : $hide ); $overrides = array( $type => !$chosen ); - $links[] = $this->makeSelfLink( $msg, array_merge( $overrides, $changed ) ); + $links[] = $this->makeSelfLink( $msg, array_merge( $changed, $overrides ) ); } return Xml::fieldset( wfMsg( 'whatlinkshere-filters' ), $wgLang->pipeList( $links ) ); } -- 2.20.1