http://www.mediawiki.org/wiki/Special:Code/MediaWiki/87777

Revision: 87777
Author:   bawolff
Date:     2011-05-09 22:53:41 +0000 (Mon, 09 May 2011)
Log Message:
-----------
(follow-up r87593 / bug 28875) Replace calls to makeKnownLink with Linker::link 
since makeKnownLink was killed in 1.19.

Modified Paths:
--------------
    trunk/extensions/ConfirmAccount/ConfirmAccount_body.php
    trunk/extensions/ConfirmAccount/RequestAccount_body.php
    trunk/extensions/ConfirmAccount/UserCredentials_body.php
    trunk/extensions/CrossNamespaceLinks/CrossNamespaceLinks_body.php
    trunk/extensions/ProofreadPage/ProofreadPage_body.php
    trunk/extensions/SemanticForms/includes/SF_FormUtils.php
    trunk/extensions/gis/GeoParam.php
    trunk/extensions/gis/geo.php

Modified: trunk/extensions/ConfirmAccount/ConfirmAccount_body.php
===================================================================
--- trunk/extensions/ConfirmAccount/ConfirmAccount_body.php     2011-05-09 
21:32:46 UTC (rev 87776)
+++ trunk/extensions/ConfirmAccount/ConfirmAccount_body.php     2011-05-09 
22:53:41 UTC (rev 87777)
@@ -84,7 +84,7 @@
                # Show other sub-queue links. Grey out the current one.
                # When viewing a request, show them all.
                if( $this->acrID || $this->showStale || $this->showRejects || 
$this->showHeld ) {
-                       $listLink = $this->skin->makeKnownLinkObj( $titleObj, 
wfMsgHtml( 'confirmaccount-showopen' ) );
+                       $listLink = Linker::link( $titleObj, wfMsgHtml( 
'confirmaccount-showopen' ), array(), array(), "known" );
                } else {
                        $listLink = wfMsgHtml( 'confirmaccount-showopen' );
                }
@@ -279,7 +279,7 @@
                                        }
                                        $formName = "wpArea-" . 
htmlspecialchars(str_replace(' ','_',$set[0]));
                                        if( isset($set[1]) ) {
-                                               $pg = 
$this->skin->makeKnownLink( $set[1], wfMsgHtml('requestaccount-info') );
+                                               $pg = Linker::link( 
Title::newFromText( $set[1] ), wfMsgHtml('requestaccount-info'), array(), 
array(), "known" );
                                        } else {
                                                $pg = '';
                                        }

Modified: trunk/extensions/ConfirmAccount/RequestAccount_body.php
===================================================================
--- trunk/extensions/ConfirmAccount/RequestAccount_body.php     2011-05-09 
21:32:46 UTC (rev 87776)
+++ trunk/extensions/ConfirmAccount/RequestAccount_body.php     2011-05-09 
22:53:41 UTC (rev 87777)
@@ -141,7 +141,7 @@
                                        }
                                        $formName = "wpArea-" . 
htmlspecialchars( str_replace( ' ', '_', $set[0] ) );
                                        if ( isset( $set[1] ) ) {
-                                               $pg = 
$this->skin->makeKnownLink( $set[1], wfMsgHtml( 'requestaccount-info' ) );
+                                               $pg = Linker::link( 
Title::newFromText( $set[1] ), wfMsgHtml( 'requestaccount-info' ), array(), 
array(), "known" );
                                        } else {
                                                $pg = '';
                                        }

Modified: trunk/extensions/ConfirmAccount/UserCredentials_body.php
===================================================================
--- trunk/extensions/ConfirmAccount/UserCredentials_body.php    2011-05-09 
21:32:46 UTC (rev 87776)
+++ trunk/extensions/ConfirmAccount/UserCredentials_body.php    2011-05-09 
22:53:41 UTC (rev 87777)
@@ -111,7 +111,7 @@
                                        }
                                        $formName = "wpArea-" . 
htmlspecialchars( str_replace( ' ', '_', $set[0] ) );
                                        if ( isset( $set[1] ) ) {
-                                               $pg = 
$this->skin->makeKnownLink( $set[1], wfMsgHtml( 'requestaccount-info' ) );
+                                               $pg = Linker::link( 
Title::newFromText( $set[1] ), wfMsgHtml( 'requestaccount-info' ), array(), 
array(), "known" );
                                        } else {
                                                $pg = '';
                                        }

Modified: trunk/extensions/CrossNamespaceLinks/CrossNamespaceLinks_body.php
===================================================================
--- trunk/extensions/CrossNamespaceLinks/CrossNamespaceLinks_body.php   
2011-05-09 21:32:46 UTC (rev 87776)
+++ trunk/extensions/CrossNamespaceLinks/CrossNamespaceLinks_body.php   
2011-05-09 22:53:41 UTC (rev 87777)
@@ -83,7 +83,7 @@
                $nt = Title::makeTitle( NS_MAIN, $result->title );
                $text = $wgContLang->convert( $nt->getPrefixedText() );
 
-               $plink = $skin->makeKnownLink( $nt->getPrefixedText(), 
htmlspecialchars( $text ) );
+               $plink = Linker::link( $nt, htmlspecialchars( $text ), array(), 
array(), "known" );
 
                return wfMsgExt( 'crossnamespacelinkstext', array( 'parsemag' 
), $plink, $wgLang->formatNum( $result->namespace ), htmlspecialchars( 
$wgLang->getNsText( $result->value ) ) );
        }

Modified: trunk/extensions/ProofreadPage/ProofreadPage_body.php
===================================================================
--- trunk/extensions/ProofreadPage/ProofreadPage_body.php       2011-05-09 
21:32:46 UTC (rev 87776)
+++ trunk/extensions/ProofreadPage/ProofreadPage_body.php       2011-05-09 
22:53:41 UTC (rev 87777)
@@ -477,15 +477,14 @@
         * @return bool
         */
        function imageMessage( &$imgpage, &$out ) {
-               global $wgUser;
                $index_namespace = $this->index_namespace;
                $image = $imgpage->getFile();
                if ( !$image->isMultipage() ) {
                        return true;
                }
-               $sk = $wgUser->getSkin();
                $name = $image->getTitle()->getText();
-               $link = $sk->makeKnownLink( "$index_namespace:$name", wfMsg( 
'proofreadpage_image_message' ) );
+               $title = Title::newFromText("$index_namespace:$name");
+               $link = Linker::link( $title, wfMsg( 
'proofreadpage_image_message' ), array(), array(), 'known' );
                $out->addHTML( "{$link}" );
                return true;
        }

Modified: trunk/extensions/SemanticForms/includes/SF_FormUtils.php
===================================================================
--- trunk/extensions/SemanticForms/includes/SF_FormUtils.php    2011-05-09 
21:32:46 UTC (rev 87776)
+++ trunk/extensions/SemanticForms/includes/SF_FormUtils.php    2011-05-09 
22:53:41 UTC (rev 87777)
@@ -264,7 +264,7 @@
                         && $wgTitle->getNamespace() == NS_SPECIAL ) {
                        $cancel = '<a href="javascript:history.go(-1);">' . 
$label . '</a>';
                } else
-                       $cancel = $sk->makeKnownLink( 
$wgTitle->getPrefixedText(), $label );
+                       $cancel = Linker::link( $wgTitle, $label, array(), 
array(), 'known' );
                $text = "               <span 
class='editHelp'>$cancel</span>\n";
                return $text;
        }

Modified: trunk/extensions/gis/GeoParam.php
===================================================================
--- trunk/extensions/gis/GeoParam.php   2011-05-09 21:32:46 UTC (rev 87776)
+++ trunk/extensions/gis/GeoParam.php   2011-05-09 22:53:41 UTC (rev 87777)
@@ -312,7 +312,16 @@
                }
                return $res."&pagetitle={$this->title}";
        }
+       /**
+        * Produce array for Linker functions
+        */
+       function get_param_array() {
+               $res = $this->coor;
+               $res['pagetitle'] = $this->title;
 
+               return $res;
+       }
+
        /**
         *  Produce markup suitable for use in page
         *  Use original content as much as possible

Modified: trunk/extensions/gis/geo.php
===================================================================
--- trunk/extensions/gis/geo.php        2011-05-09 21:32:46 UTC (rev 87776)
+++ trunk/extensions/gis/geo.php        2011-05-09 22:53:41 UTC (rev 87777)
@@ -156,6 +156,6 @@
        $skin = $wgUser->getSkin();
 
        // !JF1 Replace Special: by NS call.
-       return $skin->makeKnownLink( 'Special:Geo', $geo->get_markup(), 
$geo->get_param_string() );
+       return Linker::link( Title::makeTitle( NS_SPECIAL, 'Geo' ), 
$geo->get_markup(), $geo->get_param_array() );
 
 }


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to