* (bug 10145) Wrap the tool links on Special:Whatlinkshere in a classed span to allow...
authorRob Church <robchurch@users.mediawiki.org>
Tue, 5 Jun 2007 13:02:18 +0000 (13:02 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Tue, 5 Jun 2007 13:02:18 +0000 (13:02 +0000)
* Avoid using the "sub page form" when generating links to special pages with other titles as parameters, it causes problems for long target titles

includes/SpecialWhatlinkshere.php

index 4d0c8ac..fdf3373 100644 (file)
@@ -230,12 +230,14 @@ class WhatLinksHerePage {
                                $wgOut->addHTML( ' (' . implode( ', ', $props ) . ') ' );
                        }
 
-                       //add whatlinkshere link
-                       $whatlink = $this->skin->makeKnownLinkObj(
-                               SpecialPage::getTitleFor( 'Whatlinkshere', $nt->getPrefixedDBkey() ),
-                               wfMsgHtml( 'whatlinkshere-links' ) );
-                       $wgOut->addHTML(" ($whatlink)" );
-
+                       # Space for utilities links, with a what-links-here link provided
+                       $wlh = $this->skin->makeKnownLinkObj(
+                               SpecialPage::getTitleFor( 'Whatlinkshere' ),
+                               wfMsgHtml( 'whatlinkshere-links' ),
+                               'target=' . $nt->getPrefixedUrl()
+                       );
+                       $wgOut->addHtml( ' <span class="mw-whatlinkshere-tools">(' . $wlh . ')</span>' );                       
+                       
                        if ( $row->page_is_redirect ) {
                                if ( $level < 2 ) {
                                        $this->showIndirectLinks( $level + 1, $nt, 500 );