Revert "CommentFormatter: Switch from deprecated addJsConfigVars to new setJsConfigVar"

Silence the deprecation warning instead to avoid regressing T372193.
I filed T372592 about the bigger problem we have here.

This reverts commit fe8526caf2.

Bug: T372499
Change-Id: I47884f99e9c18fffd22ffdc27f5c61515b60c8f8
This commit is contained in:
Bartosz Dziewoński 2024-08-15 19:42:23 +00:00
parent 85698895f5
commit 3e9b3255cd

View file

@ -416,8 +416,9 @@ class CommentFormatter {
// Temporary hack to deal with T351461#9358034: this should be a
// call to `setJsConfigVar` but Parsoid is currently reprocessing
// content from extensions.
$pout->setJsConfigVar( 'wgDiscussionToolsPageThreads', $threadsJSON );
// content from extensions. (T372592)
// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
@$pout->addJsConfigVars( 'wgDiscussionToolsPageThreads', $threadsJSON );
// Like DOMCompat::getInnerHTML(), but disable 'smartQuote' for compatibility with
// ParserOutput::EDITSECTION_REGEX matching 'mw:editsection' tags (T274709)