* (bug 20494) OutputPage::getArticleBodyOnly() no longer requires an useless argument
[lhc/web/wiklou.git] / includes / specials / SpecialWhatlinkshere.php
index dd8eee3..6c0ceee 100644 (file)
@@ -29,6 +29,8 @@ class SpecialWhatLinksHere extends SpecialPage {
        function execute( $par ) {
                global $wgOut, $wgRequest;
 
+               $this->setHeaders();
+
                $opts = new FormOptions();
 
                $opts->add( 'target', '' );
@@ -258,8 +260,18 @@ class SpecialWhatLinksHere extends SpecialPage {
                        }
                }
 
-               $suppressRedirect = $row->page_is_redirect ? 'redirect=no' : '';
-               $link = $this->skin->makeKnownLinkObj( $nt, '', $suppressRedirect );
+               if( $row->page_is_redirect ) {
+                       $query = array( 'redirect' => 'no' );
+               } else {
+                       $query = array();
+               }
+
+               $link = $this->skin->linkKnown(
+                       $nt,
+                       null,
+                       array(),
+                       $query
+               );
 
                // Display properties (redirect or template)
                $propsText = '';
@@ -293,12 +305,21 @@ class SpecialWhatLinksHere extends SpecialPage {
                if ( $title === null )
                        $title = SpecialPage::getTitleFor( 'Whatlinkshere' );
 
-               $targetText = $target->getPrefixedUrl();
-               return $this->skin->makeKnownLinkObj( $title, $text, 'target=' . $targetText );
+               return $this->skin->linkKnown(
+                       $title,
+                       $text,
+                       array(),
+                       array( 'target' => $target->getPrefixedText() )
+               );
        }
 
        function makeSelfLink( $text, $query ) {
-               return $this->skin->makeKnownLinkObj( $this->selfTitle, $text, $query );
+               return $this->skin->linkKnown(
+                       $this->selfTitle,
+                       $text,
+                       array(),
+                       $query
+               );
        }
 
        function getPrevNext( $prevId, $nextId ) {
@@ -313,18 +334,18 @@ class SpecialWhatLinksHere extends SpecialPage {
 
                if ( 0 != $prevId ) {
                        $overrides = array( 'from' => $this->opts->getValue( 'back' ) );
-                       $prev = $this->makeSelfLink( $prev, wfArrayToCGI( $overrides, $changed ) );
+                       $prev = $this->makeSelfLink( $prev, array_merge( $changed, $overrides ) );
                }
                if ( 0 != $nextId ) {
                        $overrides = array( 'from' => $nextId, 'back' => $prevId );
-                       $next = $this->makeSelfLink( $next, wfArrayToCGI( $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, wfArrayToCGI( $overrides, $changed ) );
+                       $limitLinks[] = $this->makeSelfLink( $prettyLimit, array_merge( $changed, $overrides ) );
                }
 
                $nums = $wgLang->pipeList( $limitLinks );
@@ -391,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, wfArrayToCGI( $overrides, $changed ) );
+                       $links[] = $this->makeSelfLink( $msg, array_merge( $changed, $overrides ) );
                }
                return Xml::fieldset( wfMsg( 'whatlinkshere-filters' ), $wgLang->pipeList( $links ) );
        }