if ( $module instanceof ResourceLoaderModule
&& $module->getOrigin() <= $this->getAllowedModules( $type )
&& ( is_null( $position ) || $module->getPosition() == $position )
- && ( !$this->mTarget || in_array( $this->mTarget, $module->getTargets() ) )
) {
+ if ( $this->mTarget && !in_array( $this->mTarget, $module->getTargets() ) ) {
+ $this->warnModuleTargetFilter( $module->getName() );
+ continue;
+ }
$filteredModules[] = $val;
}
}
return $filteredModules;
}
+ private function warnModuleTargetFilter( $moduleName ) {
+ static $warnings = [];
+ if ( isset( $warnings[$this->mTarget][$moduleName] ) ) {
+ return;
+ }
+ $warnings[$this->mTarget][$moduleName] = true;
+ $this->getResourceLoader()->getLogger()->debug(
+ 'Module "{module}" not loadable on target "{target}".',
+ [
+ 'module' => $moduleName,
+ 'target' => $this->mTarget,
+ ]
+ );
+ }
+
/**
* Get the list of modules to include on this page
*
'epoch' => $config->get( 'CacheEpoch' )
];
if ( $config->get( 'UseSquid' ) ) {
- // bug 44570: the core page itself may not change, but resources might
+ // T46570: the core page itself may not change, but resources might
$modifiedTimes['sepoch'] = wfTimestamp( TS_MW, time() - $config->get( 'SquidMaxage' ) );
}
Hooks::run( 'OutputPageCheckLastModified', [ &$modifiedTimes, $this ] );
ResourceLoaderModule::ORIGIN_CORE_INDIVIDUAL
);
- // Site-wide styles are controlled by a config setting, see bug 71621
+ // Site-wide styles are controlled by a config setting, see T73621
// for background on why. User styles are never allowed.
if ( $this->getConfig()->get( 'AllowSiteCSSOnRestrictedPages' ) ) {
$styleOrigin = ResourceLoaderModule::ORIGIN_USER_SITEWIDE;
// been changed somehow, and keep it if so.
$anonPO = ParserOptions::newFromAnon();
$anonPO->setEditSection( false );
+ $anonPO->setAllowUnsafeRawHtml( false );
if ( !$options->matches( $anonPO ) ) {
wfLogWarning( __METHOD__ . ': Setting a changed bogus ParserOptions: ' . wfGetAllCallers( 5 ) );
$options->isBogus = false;
// either.
$po = ParserOptions::newFromAnon();
$po->setEditSection( false );
+ $po->setAllowUnsafeRawHtml( false );
$po->isBogus = true;
if ( $options !== null ) {
$this->mParserOptions = empty( $options->isBogus ) ? $options : null;
$this->mParserOptions = ParserOptions::newFromContext( $this->getContext() );
$this->mParserOptions->setEditSection( false );
+ $this->mParserOptions->setAllowUnsafeRawHtml( false );
}
if ( $options !== null && !empty( $options->isBogus ) ) {
) {
$displayReturnto = null;
- # Due to bug 32276, if a user does not have read permissions,
+ # Due to T34276, if a user does not have read permissions,
# $this->getTitle() will just give Special:Badtitle, which is
# not especially useful as a returnto parameter. Use the title
# from the request instead, if there was one.
$curRevisionId = 0;
$articleId = 0;
- $canonicalSpecialPageName = false; # bug 21115
+ $canonicalSpecialPageName = false; # T23115
$title = $this->getTitle();
$ns = $title->getNamespace();
$sk = $this->getSkin();
// Get the relevant title so that AJAX features can use the correct page name
- // when making API requests from certain special pages (bug 34972).
+ // when making API requests from certain special pages (T36972).
$relevantTitle = $sk->getRelevantTitle();
$relevantUser = $sk->getRelevantUser();
* $wgOut->addWikiText( "<div class='error'>\n"
* . wfMessage( 'some-error' )->plain() . "\n</div>" );
*
- * The newline after the opening div is needed in some wikitext. See bug 19226.
+ * The newline after the opening div is needed in some wikitext. See T21226.
*
* @param string $wrap
*/