Page MenuHomePhabricator

Replace Linker::link() usage with LinkRenderer in XX extension (clonable)
Open, Needs TriagePublic

Description

The Linker::link() function is deprecated as of 1.28, and the new LinkRenderer is preferred instead. This task is to migrate extensions to use the new code instead of the deprecated function.

Skills required: PHP, MediaWiki

A list of usages of Linker::link() from PhpStorm:

Directory | Usage count
extensions/AbuseFilter 2 (done)
extensions/AbuseFilter/special 2 (done)
extensions/AbuseFilter/Views 17 (done)
extensions/ApprovedRevs 2 (partially done)
extensions/ArticleFeedback 3 (done)
extensions/ArticleFeedbackv5 1 2 (done)
extensions/ArticleFeedbackv5/api 1 (done)
extensions/ArticleRatings 1 (done)
extensions/BibManager/includes 7 (done)
extensions/BibManager/includes/specials 2 (done)
extensions/BlockAndNuke 3 (done)
extensions/BlogPage 2 (done)
extensions/BlueSpiceExtensions/ArticleInfo 2
extensions/BlueSpiceExtensions/CountThings/views 1
extensions/BlueSpiceExtensions/ExtendedSearch/includes 1
extensions/BlueSpiceExtensions/ExtendedSearch/includes/SearchIndex 6
extensions/BlueSpiceExtensions/ExtensionInfo 1
extensions/BlueSpiceExtensions/PageAccess/includes/specials 1
extensions/BlueSpiceExtensions/PageAssignments/includes 3
extensions/BlueSpiceExtensions/PageAssignments/includes/api 1
extensions/BlueSpiceExtensions/Readers/includes/api 4
extensions/BlueSpiceExtensions/Review 6
extensions/BlueSpiceExtensions/RSSStandards 1 (done)
extensions/BlueSpiceExtensions/ShoutBox 1
extensions/BlueSpiceExtensions/SmartList 1
extensions/BlueSpiceExtensions/UserSidebar 1
extensions/BlueSpiceExtensions/WhoIsOnline/views 1
extensions/BlueSpiceExtensions/WidgetBar/views 1
extensions/BlueSpiceFoundation/includes/api 2
extensions/BlueSpiceFoundation/includes/skins 1
extensions/BlueSpiceFoundation/includes/utility 1
extensions/BookManagerv2 9
extensions/BreadCrumbs 2 (done)
extensions/Cargo 2 (partially done)
extensions/Cargo/drilldown 1 (done)
extensions/Cargo/specials 2 (done)
extensions/CentralAuth/includes 3
extensions/CentralAuth/includes/GlobalRename 1
extensions/CentralAuth/includes/specials 5 (done)
extensions/CentralNotice/includes 3 (in progress)
extensions/CentralNotice/includes/HtmlFormElements 2
extensions/CentralNotice/special 9 (in progress)
extensions/Challenge 10
extensions/Challenge/templates 9
extensions/CheckUser (done)
extensions/CheckUser/specials 1 (done)
extensions/CleanChanges 2
extensions/CodeReview/backend 1 (done)
extensions/CodeReview/ui 25 (done)
extensions/CommentStreams/includes 2 (done)
extensions/CommunityApplications 1
extensions/Configure/specials 4
extensions/ContributionsList 1
extensions/DataTransfer/specials 1
extensions/Disambiguator/specials 1 (done)
extensions/DiscussionThreading 4
extensions/DPLforum 7 (done)
extensions/DumpHTML 1
extensions/Echo 1
extensions/EducationProgram/includes 5
extensions/EducationProgram/includes/actions 4
extensions/EducationProgram/includes/pagers 1
extensions/EducationProgram/includes/specials 1 (done)
extensions/EducationProgram/includes/tables 1
extensions/EventLogging/includes 1
extensions/FanBoxes 5
extensions/Favorites 12
extensions/FlaggedRevs/frontend 5
extensions/FlaggedRevs/frontend/specialpages/reports 12 (done)
extensions/Flow 1
extensions/Flow/includes 2
extensions/Flow/includes/Block 3
extensions/Flow/includes/Formatter 4
extensions/Flow/includes/Parsoid/Fixer 1
extensions/Gadgets 4 (done)
extensions/GeoCrumbs 1
extensions/GlobalBlocking/includes/specials 1
extensions/GlobalCssJs 1
extensions/GlobalPreferences 1
extensions/GlobalUsage 5 (done)
extensions/GoogleMaps 1
extensions/GWToolset/includes/Forms 5 (done)
extensions/GWToolset/includes/Handlers/Forms 1 (done)
extensions/GWToolset/includes/Models 1 (done)
extensions/GWToolset/includes/Specials 1 (done)
extensions/HitCounters/includes 1
extensions/ImageTagging 3
extensions/ImportFreeImages 1
extensions/IndexFunction 5
extensions/Interlanguage 2
extensions/intersection 1
extensions/Interwiki 1 (in progress)
extensions/LastUserLogin 1
extensions/LifeWeb 1 (done)
extensions/LightweightRDFa 1
extensions/LinkFilter 3
extensions/LiquidThreads/api 2 (done)
extensions/LiquidThreads/classes 16 (done)
extensions/LiquidThreads/pages 16 (done)
extensions/Maintenance 4
extensions/MassEditRegex 1
extensions/MassMessage/includes/content 1
extensions/MassMessage/includes/logging 2
extensions/MiniInvite 4
extensions/MobileFrontend/includes/skins 1 (done)
extensions/MobileFrontend/includes/specials 4 (done)
extensions/MoodBar 6
extensions/Newsletter/includes/logging 1 (done)
extensions/Newsletter/includes/specials 1 (done)
extensions/Nuke 1 (done)
extensions/NukeDPL 1
extensions/OATHAuth 1
extensions/OAuthAuthentication/utils 2
extensions/OpenID 6
extensions/OpenStackManager/nova 2
extensions/OpenStackManager/special 37
extensions/PageBlock 3
extensions/PageForms/includes 4
extensions/PageForms/specials 2
extensions/PageSchemas/specials 1
extensions/Patroller 1
extensions/Petition 1
extensions/Phalanx 2
extensions/PictureGame 3
extensions/PollNY 9 (done)
extensions/PrefStats 1
extensions/Premoderation 3
extensions/ProofreadPage 4
extensions/QuizGame 10 (done)
extensions/ReaderFeedback/specialpages 1
extensions/RecentActivityFeed 1
extensions/Renameuser 2 (done)
extensions/Renameuser/specials 2 (done)
extensions/ReplaceText 6 (done)
extensions/RevisionCommentSupplement/special 3
extensions/Scribunto/engines/LuaSandbox 1
extensions/SecurePoll/includes/pages 2
extensions/SelectCategory 1
extensions/SemanticDrilldown/includes 2
extensions/SemanticDrilldown/specials 1
extensions/SemanticForms/includes 4
extensions/SemanticForms/specials 2
extensions/SemanticMaps/src/queryprinters1
extensions/SemanticMediaWiki/includes 3
extensions/SemanticMediaWiki/includes/datavalues 1
extensions/SemanticMediaWiki/src/Query 1
extensions/SemanticPageMaker/includes/widgets/datatype 1
extensions/SemanticPageMaker/specials/WidgetAssembler 5
extensions/SemanticResultFormats/formats/calendar 1
extensions/SemanticSifter/src/main/parserfunction 1
extensions/SideBarMenu/src 1
extensions/SiteScout 1
extensions/SmiteSpam 3 (done)
extensions/SmiteSpam/api 2 (done)
extensions/SmoothGallery 1
extensions/SocialProfile/SystemGifts 4 (done)
extensions/SocialProfile/UserActivity 1 (done)
extensions/SocialProfile/UserBoard 3 (done)
extensions/SocialProfile/UserGifts 6 (done)
extensions/SocialProfile/UserProfile 2 (done)
extensions/SocialProfile/UserRelationship 7 (done)
extensions/SocialProfile/UserStats 3 (done)
extensions/SpamDiffTool 1
extensions/SpecialNamespaces 3
extensions/SpellingDictionary/includes 2
extensions/SportsTeams 25
extensions/SSLClientAuthentication 1
extensions/Sudo 5
extensions/TimedMediaHandler 3
extensions/TitleIcon 1 (done)
extensions/Translate/specials 8 (done)
extensions/Translate/tag 5
extensions/Translate/utils 5
extensions/TwoFactorAuthentication 2
extensions/UnusedRedirects 2
extensions/UserMerge 2 (done)
extensions/UserPageViewTracker 2 (in progress)
extensions/UserStatus 4
extensions/Video 1
extensions/VisualEditor 2 (done)
extensions/VoteNY 1 (in progress)
extensions/WantedPagesFromNS 2
extensions/WatchSubpages 2
extensions/Wikibase/client/includes/RecentChanges 1
extensions/Wikibase/client/includes/Specials 1 (done)
extensions/WikiForum 3
extensions/WikiLexicalData/OmegaWiki 5
extensions/Wikilog 20
extensions/WikimediaIncubator 4 (partially done)
extensions/WYSIWYG/WYSIWYG 1
includes 27
includes/actions 12 (done)
includes/cache 1 (done)
includes/changetags 1 (done)
includes/logging 6 (done)
includes/page 1
includes/revisiondelete 5 (done)
includes/skins 3
includes/specialpage 6 (done)
includes/specials 32 (done)
includes/specials/pagers 6 (done)
includes/user 1
tests/phpunit/includes 2
tests/phpunit/includes/logging 4

Example conversion (simple): https://gerrit.wikimedia.org/r/#/c/303075/

Documentation: https://www.mediawiki.org/wiki/Manual:LinkRenderer

Note: By default LinkRenderer does HTML escaping, so whatever is being passed in as the text may need to be adjusted to avoid double escaping.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 340544 had a related patch set uploaded (by Filip):
[mediawiki/extensions/PollNY] Replaced deprecated Linker::link usages

https://gerrit.wikimedia.org/r/340544

Change 339818 merged by jenkins-bot:
Replace Linker::link() with LinkRenderer

https://gerrit.wikimedia.org/r/339818

Change 335987 merged by Umherirrender:
[mediawiki/extensions/Disambiguator] Replace Linker::link() usage with LinkRenderer

https://gerrit.wikimedia.org/r/335987

Change 340544 merged by jenkins-bot:
[mediawiki/extensions/PollNY] Replaced deprecated Linker::link usages

https://gerrit.wikimedia.org/r/340544

Change 335984 merged by jenkins-bot:
[mediawiki/extensions/Wikibase] Replace most Linker::link() usage with LinkRenderer

https://gerrit.wikimedia.org/r/335984

Change 336012 merged by jenkins-bot:
[mediawiki/extensions/Gadgets@master] Replace Linker::link() with LinkRenderer

https://gerrit.wikimedia.org/r/336012

matej_suchanek updated the task description. (Show Details)

Change 344449 had a related patch set (by Matěj Suchánek) published:
[mediawiki/core@master] Replace Linker::link() with LinkRenderer in special pages

https://gerrit.wikimedia.org/r/344449

Change 339825 merged by jenkins-bot:
[mediawiki/extensions/WikimediaIncubator@master] Replace most Linker::link() usage with LinkRenderer

https://gerrit.wikimedia.org/r/339825

Change 324680 abandoned by TTO:
Replace some of the Linker::link occurrences in special pages

Reason:
These all appear to have been addressed by others in the meantime.

https://gerrit.wikimedia.org/r/324680

Change 326886 abandoned by Krinkle:
Replace Linker::link*() usage with LinkRenderer

Reason:
Superseded by I5c6a85a552424

https://gerrit.wikimedia.org/r/326886

Change 359686 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/core@master] Replace a Linker::link() call in InfoAction.php

https://gerrit.wikimedia.org/r/359686

jo12bar removed a subscriber: jo12bar.Jun 17 2017, 7:43 PM

Change 359688 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/extensions/FlaggedRevs@master] Replace Linker::link() with LinkRenderer in special pages

https://gerrit.wikimedia.org/r/359688

Change 359787 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/extensions/Translate@master] Replace Linker::link() with LinkRenderer in special pages

https://gerrit.wikimedia.org/r/359787

Change 359686 merged by jenkins-bot:
[mediawiki/core@master] Replace a Linker::link() call in InfoAction.php

https://gerrit.wikimedia.org/r/359686

Change 344449 merged by jenkins-bot:
[mediawiki/core@master] Replace Linker::link() with LinkRenderer in special pages

https://gerrit.wikimedia.org/r/344449

Change 324819 merged by jenkins-bot:
[mediawiki/core@master] Replace some usages of Linker::link with LinkRenderer

https://gerrit.wikimedia.org/r/324819

Change 359787 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Replace Linker::link() with LinkRenderer in special pages

https://gerrit.wikimedia.org/r/359787

Change 364111 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/core@master] Use LogFormatter::getLinkRenderer in LogFormatter extensions

https://gerrit.wikimedia.org/r/364111

Change 364127 had a related patch set (by Matěj Suchánek) published:
[mediawiki/extensions/ArticleFeedbackv5@master] Replace a Linker::link call in SpecialArticleFeedbackv5.php

https://gerrit.wikimedia.org/r/364127

Change 364127 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/extensions/ArticleFeedbackv5@master] Replace a Linker::link call in SpecialArticleFeedbackv5.php

https://gerrit.wikimedia.org/r/364127

Change 364127 merged by jenkins-bot:
[mediawiki/extensions/ArticleFeedbackv5@master] Replace a Linker::link call in SpecialArticleFeedbackv5.php

https://gerrit.wikimedia.org/r/364127

Change 359688 merged by jenkins-bot:
[mediawiki/extensions/FlaggedRevs@master] Replace Linker::link() with LinkRenderer in special pages

https://gerrit.wikimedia.org/r/359688

Restricted Application added a subscriber: PokestarFan. · View Herald TranscriptAug 11 2017, 8:58 PM

Change 328892 merged by jenkins-bot:
[mediawiki/extensions/BlueSpiceExtensions@master] Replaced Linker::link() usages with LinkRenderer

https://gerrit.wikimedia.org/r/328892

Change 364111 merged by jenkins-bot:
[mediawiki/core@master] Use LogFormatter::getLinkRenderer in LogFormatter extensions

https://gerrit.wikimedia.org/r/364111

Fz-29 added a subscriber: Fz-29.Jan 5 2018, 8:49 PM

@Aklapper
I can mentor this task.

Change 409377 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/extensions/Renameuser@master] Use LinkRenderer instead of Linker

https://gerrit.wikimedia.org/r/409377

Change 410405 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/extensions/CheckUser@master] Update ContributionsToolLinks hook handler

https://gerrit.wikimedia.org/r/410405

Change 410405 merged by jenkins-bot:
[mediawiki/extensions/CheckUser@master] Update ContributionsToolLinks hook handler

https://gerrit.wikimedia.org/r/410405

Change 409377 merged by jenkins-bot:
[mediawiki/extensions/Renameuser@master] Use LinkRenderer instead of Linker

https://gerrit.wikimedia.org/r/409377

Change 423521 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/extensions/CentralNotice@master] Replace some Linker::link() usages with LinkRenderer

https://gerrit.wikimedia.org/r/423521

Change 426157 had a related patch set uploaded (by Cicalese; owner: Cicalese):
[mediawiki/extensions/CommentStreams@master] Replaced Linker::link() with LinkRenderer

https://gerrit.wikimedia.org/r/426157

Change 426157 merged by jenkins-bot:
[mediawiki/extensions/CommentStreams@master] Replaced Linker::link() with LinkRenderer

https://gerrit.wikimedia.org/r/426157

Change 426238 had a related patch set uploaded (by Cicalese; owner: Cicalese):
[mediawiki/extensions/TitleIcon@master] Replaced Linker::link() with LinkRenderer

https://gerrit.wikimedia.org/r/426238

Change 426238 merged by jenkins-bot:
[mediawiki/extensions/TitleIcon@master] Replaced Linker::link() with LinkRenderer

https://gerrit.wikimedia.org/r/426238

Change 426321 had a related patch set uploaded (by Cicalese; owner: Cicalese):
[mediawiki/extensions/ReplaceText@master] Replaced Linker::link() with LinkRenderer

https://gerrit.wikimedia.org/r/426321

Change 426321 merged by jenkins-bot:
[mediawiki/extensions/ReplaceText@master] Replaced Linker::link() with LinkRenderer

https://gerrit.wikimedia.org/r/426321

Change 423524 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/extensions/Interwiki@master] Replace Linker::link() with LinkRenderer

https://gerrit.wikimedia.org/r/423524

Change 439473 had a related patch set uploaded (by Jayprakash12345; owner: Jayprakash12345):
[mediawiki/extensions/VoteNY@master] Replace some Linker::link() usages with LinkRenderer

https://gerrit.wikimedia.org/r/439473

Change 439480 had a related patch set uploaded (by Jayprakash12345; owner: Jayprakash12345):
[mediawiki/extensions/UserPageViewTracker@master] Replace some Linker::link() usages with LinkRenderer

https://gerrit.wikimedia.org/r/439480

Change 423524 merged by jenkins-bot:
[mediawiki/extensions/Interwiki@master] Replace Linker::link() with LinkRenderer

https://gerrit.wikimedia.org/r/423524

Change 336010 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@master] Replace Linker::link() with LinkRenderer

https://gerrit.wikimedia.org/r/336010

Change 439473 merged by jenkins-bot:
[mediawiki/extensions/VoteNY@master] Replace some Linker::link() usages with LinkRenderer

https://gerrit.wikimedia.org/r/439473

Change 452571 had a related patch set uploaded (by Fomafix; owner: Fomafix):
[mediawiki/extensions/Echo@master] Replace deprecated Linker::link() with LinkRenderer

https://gerrit.wikimedia.org/r/452571

Change 452571 merged by jenkins-bot:
[mediawiki/extensions/Echo@master] Replace deprecated Linker::link() with LinkRenderer

https://gerrit.wikimedia.org/r/452571

Change 452726 had a related patch set uploaded (by Fomafix; owner: Fomafix):
[mediawiki/extensions/Flow@master] Replace deprecated Linker::link() with LinkRenderer

https://gerrit.wikimedia.org/r/452726

Change 452726 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Replace deprecated Linker::link() with LinkRenderer

https://gerrit.wikimedia.org/r/452726

Change 423521 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@master] Replace some Linker::link() usages with LinkRenderer

https://gerrit.wikimedia.org/r/423521

Change 463823 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[mediawiki/core@master] Replace Linker::linkKnown() with LinkRenderer in DifferenceEngine.php

https://gerrit.wikimedia.org/r/463823

Change 463825 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[mediawiki/core@master] Replace Linker::link() usage with LinkRenderer in includes/page

https://gerrit.wikimedia.org/r/463825

Change 463823 abandoned by Urbanecm:
Replace Linker::linkKnown() with LinkRenderer in DifferenceEngine.php

https://gerrit.wikimedia.org/r/463823

Change 463825 abandoned by Urbanecm:
Replace Linker::link() usage with LinkRenderer in includes/page

https://gerrit.wikimedia.org/r/463825

Change 521466 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/core@master] Clean up LinkRenderer usage in IndexPager and extensions

https://gerrit.wikimedia.org/r/521466