mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-28 10:11:45 +00:00
Merge "Fix displaying reply links after posting a reply with dtenable=1"
This commit is contained in:
commit
7467e89da4
|
@ -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',
|
||||
|
|
|
@ -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' )
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue