Reverting 17479/17480, breaks subclassing of Linker methods by skins. See my comment...
[lhc/web/wiklou.git] / includes / SpecialSearch.php
index 2d0ef1e..8c2f8aa 100644 (file)
@@ -126,7 +126,8 @@ class SpecialSearch {
 
                $this->setupPage( $term );
 
-               global $wgOut;
+               global $wgUser, $wgOut;
+               $sk = $wgUser->getSkin();
                $wgOut->addWikiText( wfMsg( 'searchresulttext' ) );
 
                #if ( !$this->parseQuery() ) {
@@ -320,13 +321,14 @@ class SpecialSearch {
                        wfProfileOut( $fname );
                        return "<!-- Broken link in search result -->\n";
                }
+               $sk =& $wgUser->getSkin();
 
                $contextlines = $wgUser->getOption( 'contextlines' );
                if ( '' == $contextlines ) { $contextlines = 5; }
                $contextchars = $wgUser->getOption( 'contextchars' );
                if ( '' == $contextchars ) { $contextchars = 50; }
 
-               $link = Linker::makeKnownLinkObj( $t );
+               $link = $sk->makeKnownLinkObj( $t );
                $revision = Revision::newFromTitle( $t );
                $text = $revision->getText();
                $size = wfMsgExt( 'nbytes', array( 'parsemag', 'escape'),