From 3ec0789d06c2473e5a4c5a951a402166720ca49a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Thu, 15 Aug 2024 19:42:23 +0000 Subject: [PATCH] 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 fe8526caf2f1194189f4f9c7e9b5d390adb53480. Bug: T372499 Change-Id: I47884f99e9c18fffd22ffdc27f5c61515b60c8f8 --- includes/CommentFormatter.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/CommentFormatter.php b/includes/CommentFormatter.php index feac80451..e46d06f5a 100644 --- a/includes/CommentFormatter.php +++ b/includes/CommentFormatter.php @@ -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)