Merge "User: Avoid deprecated Linker::link()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 28 Jun 2017 12:49:55 +0000 (12:49 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 28 Jun 2017 12:49:55 +0000 (12:49 +0000)
1  2 
includes/user/User.php

diff --combined includes/user/User.php
@@@ -2506,7 -2506,7 +2506,7 @@@ class User implements IDBAccessObject 
                        $cache->delete( $key, 1 );
                } else {
                        wfGetDB( DB_MASTER )->onTransactionPreCommitOrIdle(
 -                              function() use ( $cache, $key ) {
 +                              function () use ( $cache, $key ) {
                                        $cache->delete( $key );
                                },
                                __METHOD__
                        }
  
                        // Try to update the DB post-send and only if needed...
 -                      DeferredUpdates::addCallableUpdate( function() use ( $title, $oldid ) {
 +                      DeferredUpdates::addCallableUpdate( function () use ( $title, $oldid ) {
                                if ( !$this->getNewtalk() ) {
                                        return; // no notifications to clear
                                }
                }
                $title = UserGroupMembership::getGroupPage( $group );
                if ( $title ) {
-                       return Linker::link( $title, htmlspecialchars( $text ) );
+                       return MediaWikiServices::getInstance()
+                               ->getLinkRenderer()->makeLink( $title, $text );
                } else {
                        return htmlspecialchars( $text );
                }