Merge "Fix displaying reply links after posting a reply with dtenable=1"

This commit is contained in:
jenkins-bot 2020-11-22 23:02:21 +00:00 committed by Gerrit Code Review
commit 7467e89da4
3 changed files with 10 additions and 0 deletions

View file

@ -79,6 +79,10 @@ class Hooks {
if ( $output->getRequest()->getVal( 'dtenable' ) ) {
return true;
}
// Extra hack for parses from API, where this parameter isn't passed to derivative requests
if ( RequestContext::getMain()->getRequest()->getVal( 'dtenable' ) ) {
return true;
}
$user = $output->getUser();
$services = MediaWikiServices::getInstance();

View file

@ -252,6 +252,9 @@ CommentController.prototype.save = function ( comment, pageName ) {
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: [
'discussiontools',
'discussiontools-reply',

View file

@ -311,6 +311,9 @@ function update( data, comment, pageName, replyWidget ) {
// adding our reply links in the HTML (T266195)
useskin: mw.config.get( 'skin' ),
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', 'modules', 'jsconfigvars' ],
page: mw.config.get( 'wgRelevantPageName' )
} );