Page MenuHomePhabricator

Deprecate SkinTemplateBuildNavUrlsNav_urlsAfterPermalink hook
Closed, ResolvedPublic




// Use the copy of revision ID in case this undocumented, shady hook tries to mess with internals.
$this->getHookRunner()->onSkinTemplateBuildNavUrlsNav_urlsAfterPermalink( $this, $modifiedNavUrls, $revid, $revid );

This hook only exists to aid using BaseTemplateToolbox, in a situation where the hook user needs to check the revision to decide whether to add items into NavUrls/BaseTemplateToolbox or not. (for instance CiteThisPage, previously used it to check if title exists, albeit there are better ways of doing so)

The hook it's supposed to provide rev id for will soon be deprecated (T253416), and so this helper hook should be deprecated too.

The replacement for BaseTemplateToolbox (SidebarBeforeOutput hook) is sufficient to provide what both hooks used to provide, already demonstrated in b9bdc3fc19f1 for CiteThisPage extension and in the yet-to-be merged r601942
for WikibaseRepo

To do

Related Objects

Event Timeline

Jdlrobson changed the task status from Stalled to Open.Jun 11 2020, 8:21 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a project: patch-welcome.
Jdlrobson updated the task description. (Show Details)

The remaining extensions will be notified by the deprecation notice (as they are not deployed using Wikimedia release cycles). This can now be deprecated.

Change 605306 had a related patch set uploaded (by Ammarpad; owner: Ammarpad):
[mediawiki/core@master] Deprecate SkinTemplateBuildNavUrlsNav_urlsAfterPermalink hook

Jdlrobson updated the task description. (Show Details)

Thank you @Ammarpad !

Change 605306 merged by jenkins-bot:
[mediawiki/core@master] Deprecate SkinTemplateBuildNavUrlsNav_urlsAfterPermalink hook