Make ShowRawCssJs hook emit deprecated warnings
authorReedy <reedy@wikimedia.org>
Thu, 6 Oct 2016 13:37:54 +0000 (14:37 +0100)
committerReedy <reedy@wikimedia.org>
Thu, 6 Oct 2016 13:44:57 +0000 (14:44 +0100)
Bug: T147392
Change-Id: Iae3b1532a91a9bf545a0a3c8df1df5e59b4974db

RELEASE-NOTES-1.28
includes/diff/DifferenceEngine.php
includes/page/Article.php

index 1ece2a4..ba5c689 100644 (file)
@@ -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 ==
 
index f27db07..cd644cb 100644 (file)
@@ -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();
index 2e23e3d..4fdbdea 100644 (file)
@@ -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() );