Revert "Remove dtenable API hack"

This reverts commit a1217913ae.

Unfortunately still needed. The reply links can be disabled by just
CSS, but to enable them, we also need to generate the HTML markup,
which isn't done unconditionally. An issue with links disappearing
was reported here:
https://en.wikipedia.org/wiki/Wikipedia_talk:Talk_pages_project#c-Pelagic-20230226035400-PPelberg_(WMF)-20230223000100

Change-Id: I905d3267191193362c278d23145912f4aa0ce139
This commit is contained in:
Bartosz Dziewoński 2023-02-26 22:11:59 +00:00
parent a1217913ae
commit ffb8e164cb
2 changed files with 6 additions and 0 deletions

View file

@ -418,6 +418,9 @@ CommentController.prototype.getApiQuery = function ( pageName, checkboxes ) {
assert: mw.user.isAnon() ? 'anon' : 'user',
assertuser: mw.user.getName() || undefined,
uselang: mw.config.get( 'wgUserLanguage' ),
// HACK: Always display reply links afterwards, ignoring preferences etc., in case this was
// a page view with reply links forced with ?dtenable=1 or otherwise
dtenable: '1',
dttags: tags.join( ',' ),
editingStatsId: logger.getSessionId()
};

View file

@ -543,6 +543,9 @@ function refreshPageContents( oldId ) {
useskin: mw.config.get( 'skin' ),
mobileformat: OO.ui.isMobile(),
uselang: mw.config.get( 'wgUserLanguage' ),
// HACK: Always display reply links afterwards, ignoring preferences etc., in case this was
// a page view with reply links forced with ?dtenable=1 or otherwise
dtenable: '1',
prop: [ 'text', 'revid', 'categorieshtml', 'sections', 'displaytitle', 'subtitle', 'modules', 'jsconfigvars' ],
page: !oldId ? mw.config.get( 'wgRelevantPageName' ) : undefined,
oldid: oldId || undefined