* 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.
== Compatibility ==
}
if ( $newContent ) {
- ContentHandler::runLegacyHooks( 'EditPageGetDiffText', [ $this, &$newContent ] );
+ ContentHandler::runLegacyHooks( 'EditPageGetDiffText', [ $this, &$newContent ], '1.21' );
Hooks::run( 'EditPageGetDiffContent', [ $this, &$newContent ] );
$popts = ParserOptions::newFromUserAndLang( $wgUser, $wgContLang );
}
$hook_args = [ $this, &$content ];
- ContentHandler::runLegacyHooks( 'EditPageGetPreviewText', $hook_args );
+ ContentHandler::runLegacyHooks( 'EditPageGetPreviewText', $hook_args, '1.25' );
Hooks::run( 'EditPageGetPreviewContent', $hook_args );
$parserResult = $this->doPreviewParse( $content );
}
// Hook can force JS/CSS
- Hooks::run( 'TitleIsCssOrJsPage', [ $title, &$isCodePage ], '1.25' );
+ Hooks::run( 'TitleIsCssOrJsPage', [ $title, &$isCodePage ], '1.21' );
// Is this a user subpage containing code?
$isCodeSubpage = NS_USER == $ns
$isWikitext = $isWikitext && !$isCodePage && !$isCodeSubpage;
// Hook can override $isWikitext
- Hooks::run( 'TitleIsWikitextPage', [ $title, &$isWikitext ], '1.25' );
+ Hooks::run( 'TitleIsWikitextPage', [ $title, &$isWikitext ], '1.21' );
if ( !$isWikitext ) {
switch ( $ext ) {
}
} elseif ( !Hooks::run( 'ArticleContentViewCustom', [ $this->mNewContent, $this->mNewPage, $out ] ) ) {
// Handled by extension
- } elseif ( !ContentHandler::runLegacyHooks( 'ArticleViewCustom', [ $this->mNewContent, $this->mNewPage, $out ] ) ) {
+ } elseif ( !ContentHandler::runLegacyHooks(
+ 'ArticleViewCustom',
+ [ $this->mNewContent, $this->mNewPage, $out ],
+ '1.21'
+ ) ) {
// NOTE: deprecated hook, B/C only
// Handled by extension
} else {
# Allow extensions do their own custom view for certain pages
$outputDone = true;
- } elseif ( !ContentHandler::runLegacyHooks( 'ArticleViewCustom',
- [ $this->fetchContentObject(), $this->getTitle(), $outputPage ] ) ) {
-
+ } elseif ( !ContentHandler::runLegacyHooks(
+ 'ArticleViewCustom',
+ [ $this->fetchContentObject(), $this->getTitle(), $outputPage ],
+ '1.21'
+ ) ) {
# Allow extensions do their own custom view for certain pages
$outputDone = true;
}