mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 16:34:21 +00:00
Fix displaying reply links after posting a reply with dtenable=1
Bug: T267847 Change-Id: Ifb59cb942b673d9abcab563e6bc27fa1f6d5e9d7
This commit is contained in:
parent
3b9ba82436
commit
c17a076382
|
@ -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();
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -307,6 +307,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' )
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue