Page MenuHomePhabricator

Replace usages of Linker::link() in MediaWiki Core
Open, Needs TriagePublic

Description

Linker::link() has been deprecated since 1.28, but has a load of usages, both on WMF and non WMF deployed extensions. Therefore it's not been hard deprecated yet.

For the corresponding task for extensions, see T149346 instead.

Method
    link
Found usages  (274 usages found)
    Method call  (273 usages found)
        mediawiki  (273 usages found)
            core/includes  (15 usages found)
                DummyLinker.php  (1 usage found)
                    DummyLinker  (1 usage found)
                        link  (1 usage found)
                            15 return Linker::link(
                Linker.php  (14 usages found)
                    Linker  (14 usages found)
                        blockLink  (1 usage found)
                            1064 return self::link( $blockPage,
                        buildRollbackLink  (2 usages found)
                            1966 return self::link( $title, $html, $attrs, $query, $options );
                            1970 return self::link( $title, $html, $attrs, $query, $options );
                        emailLink  (1 usage found)
                            1084 return self::link( $emailPage,
                        formatHiddenCategories  (1 usage found)
                            1992 . self::link( $titleObj, null, [], [], 'known' )
                        linkKnown  (1 usage found)
                            150 return self::link( $target, $html, $customAttribs, $query, $options );
                        makeBrokenImageLinkObj  (2 usages found)
                            706 return self::link(
                            722 return self::link( $title, $encLabel, [], wfCgiToArray( $query ), [ 'known', 'noclasses' ] );
                        makeCommentLink  (1 usage found)
                            1427 $link = self::link( $linkTarget, $text, [], [], $options );
                        makeImageLink  (1 usage found)
                            324 return self::link( $title );
                        revDeleteLink  (1 usage found)
                            2147 $link = self::link( $sp, $html, [], $query, [ 'known', 'noclasses' ] );
                        userLink  (1 usage found)
                            923 ? self::link( $page, $linkText, [ 'class' => $classes ] )
                        userTalkLink  (1 usage found)
                            1042 return self::link( $userTalkPage,
                        userToolLinks  (1 usage found)
                            980 $items[] = self::link( $contribsPage, wfMessage( 'contribslink' )->escaped(), $attribs );
            core/includes/page  (1 usage found)
                Article.php  (1 usage found)
                    Article  (1 usage found)
                        getRedirectHeaderHtml  (1 usage found)
                            1695 $html .= '<li>' . Linker::link(
            core/includes/skins  (2 usages found)
                Skin.php  (2 usages found)
                    Skin  (2 usages found)
                        drawCategoryBrowser  (1 usage found)
                            597 $return .= Linker::link( $eltitle, htmlspecialchars( $eltitle->getText() ) );
                        getCategoryLinks  (1 usage found)
                            537 $link = $title ? Linker::link( $title, $msg ) : $msg;
            core/includes/specials/pagers  (2 usages found)
                BlockListPager.php  (2 usages found)
                    BlockListPager  (2 usages found)
                        getRestrictionListHTML  (2 usages found)
                            264 Linker::link( $restriction->getTitle() )
                            277 Linker::link(
            core/includes/user  (1 usage found)
                UserGroupMembership.php  (1 usage found)
                    UserGroupMembership  (1 usage found)
                        getLink  (1 usage found)
                            403 $groupLink = Linker::link( $linkTitle, htmlspecialchars( $groupName ) );
            core/tests/phpunit/includes  (2 usages found)
                LinkerTest.php  (2 usages found)
                    LinkerTest  (2 usages found)
                        testLinkBeginHook  (1 usage found)
                            549 $out = Linker::link( $title );
                        testLinkEndHook  (1 usage found)
                            594 $out = Linker::link( $title );
            core/tests/phpunit/includes/logging  (4 usages found)
                LogFormatterTest.php  (4 usages found)
                    LogFormatterTest  (4 usages found)
                        testLogParamsTypeRaw  (2 usages found)
                            132 $params = [ '4:raw:raw' => Linker::link( $this->title, null, [], [] ) ];
                            133 $expected = Linker::link( $this->title, null, [], [] );
                        testLogParamsTypeTitleLink  (1 usage found)
                            223 $expected = Linker::link( $this->title, null, [], [] );
                        testNormalLogParams  (1 usage found)
                            112 $titleLink = Linker::link( $this->title, null, [], [] );
    Usage in comments  (1 usage found)
        mediawiki  (1 usage found)
            core/includes  (1 usage found)
                Linker.php  (1 usage found)
                    Linker  (1 usage found)
                        138 * @see Linker::link
`

Event Timeline

What is the different to T149346?

Its the same, the other task was just 2018 gci specific.

Aklapper renamed this task from Replace usages of Linker::link() to Replace usages of Linker::link() in MediaWiki core and extensions.Apr 5 2021, 6:50 PM
Aklapper updated the task description. (Show Details)

Moved skins to five dedicated tasks.
I'd like to make this task about Core only. T149346 is already about extensions.

Aklapper renamed this task from Replace usages of Linker::link() in MediaWiki core and extensions to Replace usages of Linker::link() in MediaWiki Core.Apr 5 2021, 7:46 PM
Aklapper removed a project: Google-Code-in-2019.
Aklapper updated the task description. (Show Details)