From: Reedy Date: Thu, 6 Oct 2016 13:37:54 +0000 (+0100) Subject: Make ShowRawCssJs hook emit deprecated warnings X-Git-Tag: 1.31.0-rc.0~5184^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=8a29a56fb1c07a5b241bdf035e3ba7ee1fc570bb Make ShowRawCssJs hook emit deprecated warnings Bug: T147392 Change-Id: Iae3b1532a91a9bf545a0a3c8df1df5e59b4974db --- diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28 index 1ece2a4284..ba5c689e49 100644 --- a/RELEASE-NOTES-1.28 +++ b/RELEASE-NOTES-1.28 @@ -214,8 +214,8 @@ changes to languages because of Phabricator reports. * IP::isConfiguredProxy() and IP::isTrustedProxy() were removed. Callers should migrate to using the same functions on a ProxyLookup instance, obtainable from MediaWikiServices. -* The ArticleViewCustom, EditPageGetDiffText and EditPageGetPreviewText hooks will - now emit deprecation warnings if used. +* The ArticleViewCustom, EditPageGetDiffText, EditPageGetPreviewText and ShowRawCssJs + hooks will now emit deprecation warnings if used. == Compatibility == diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index f27db07916..cd644cb38e 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -609,7 +609,7 @@ class DifferenceEngine extends ContextSource { // This needs to be synchronised with Article::showCssOrJsPage(), which sucks // Give hooks a chance to customise the output // @todo standardize this crap into one function - if ( ContentHandler::runLegacyHooks( 'ShowRawCssJs', [ $this->mNewContent, $this->mNewPage, $out ] ) ) { + if ( ContentHandler::runLegacyHooks( 'ShowRawCssJs', [ $this->mNewContent, $this->mNewPage, $out ], '1.24' ) ) { // NOTE: deprecated hook, B/C only // use the content object's own rendering $cnt = $this->mNewRev->getContent(); diff --git a/includes/page/Article.php b/includes/page/Article.php index 2e23e3d89e..4fdbdea78c 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -800,8 +800,9 @@ class Article implements Page { // Give hooks a chance to customise the output if ( ContentHandler::runLegacyHooks( 'ShowRawCssJs', - [ $this->mContentObject, $this->getTitle(), $outputPage ] ) - ) { + [ $this->mContentObject, $this->getTitle(), $outputPage ], + '1.24' + ) ) { // If no legacy hooks ran, display the content of the parser output, including RL modules, // but excluding metadata like categories and language links $po = $this->mContentObject->getParserOutput( $this->getTitle() );