'PublishStashedFile' => 'PublishStashedFileJob',
'ThumbnailRender' => 'ThumbnailRenderJob',
'recentChangesUpdate' => 'RecentChangesUpdateJob',
+ 'refreshLinksPrioritized' => 'RefreshLinksJob', // for cascading protection
'null' => 'NullJob'
);
* Extensions with custom log types may add to this array.
*/
$wgLogActions = array(
- 'block/block' => 'blocklogentry',
- 'block/unblock' => 'unblocklogentry',
- 'block/reblock' => 'reblock-logentry',
'protect/protect' => 'protectedarticle',
'protect/modify' => 'modifiedarticleprotection',
'protect/unprotect' => 'unprotectedarticle',
'protect/move_prot' => 'movedarticleprotection',
'import/upload' => 'import-logentry-upload',
'import/interwiki' => 'import-logentry-interwiki',
- 'suppress/block' => 'blocklogentry',
- 'suppress/reblock' => 'reblock-logentry',
);
/**
'managetags/delete' => 'LogFormatter',
'managetags/activate' => 'LogFormatter',
'managetags/deactivate' => 'LogFormatter',
+ 'block/block' => 'BlockLogFormatter',
+ 'block/unblock' => 'BlockLogFormatter',
+ 'block/reblock' => 'BlockLogFormatter',
+ 'suppress/block' => 'BlockLogFormatter',
+ 'suppress/reblock' => 'BlockLogFormatter',
);
/**
}
# Get the ParserOutput actually *displayed* here.
- # Note that $this->mParserOutput is the *current* version output.
+ # Note that $this->mParserOutput is the *current*/oldid version output.
$pOutput = ( $outputDone instanceof ParserOutput )
? $outputDone // object fetched by hook
: $this->mParserOutput;
*/
public function showRedirectedFromHeader() {
global $wgRedirectSources;
- $outputPage = $this->getContext()->getOutput();
- $request = $this->getContext()->getRequest();
+ $context = $this->getContext();
+ $outputPage = $context->getOutput();
+ $request = $context->getRequest();
$rdfrom = $request->getVal( 'rdfrom' );
// Construct a URL for the current page view, but with the target title
);
$outputPage->addSubtitle( "<span class=\"mw-redirectedfrom\">" .
- wfMessage( 'redirectedfrom' )->rawParams( $redir )->parse()
+ $context->msg( 'redirectedfrom' )->rawParams( $redir )->parse()
. "</span>" );
// Add the script to update the displayed URL and
if ( $wgRedirectSources && preg_match( $wgRedirectSources, $rdfrom ) ) {
$redir = Linker::makeExternalLink( $rdfrom, $rdfrom );
$outputPage->addSubtitle( "<span class=\"mw-redirectedfrom\">" .
- wfMessage( 'redirectedfrom' )->rawParams( $redir )->parse()
+ $context->msg( 'redirectedfrom' )->rawParams( $redir )->parse()
. "</span>" );
// Add the script to update the displayed URL
}
$html .= '</ul>';
- $redirectToText = wfMessage( 'redirectto' )->inLanguage( $lang )->text();
+ $redirectToText = wfMessage( 'redirectto' )->inLanguage( $lang )->escaped();
return '<div class="redirectMsg">' .
'<p>' . $redirectToText . '</p>' .
*
* @note: custom DataUpdates do not survive serialization of the ParserOutput!
* This is especially relevant when using a cached ParserOutput for updating
- * the database, as WikiPage does if $wgAjaxStashEdit is enabled. For this
+ * the database, as WikiPage does if $wgAjaxEditStash is enabled. For this
* reason, ApiStashEdit will skip any ParserOutput that has custom DataUpdates.
*
* @since 1.20
$this->mLimitReportData[$key] = $value;
}
+ /**
+ * Check whether the cache TTL was lowered due to dynamic content
+ *
+ * When content is determined by more than hard state (e.g. page edits),
+ * such as template/file transclusions based on the current timestamp or
+ * extension tags that generate lists based on queries, this return true.
+ *
+ * @return bool
+ * @since 1.25
+ */
+ public function hasDynamicContent() {
+ global $wgParserCacheExpireTime;
+
+ return $this->getCacheExpiry() < $wgParserCacheExpireTime;
+ }
+
/**
* Get or set the prevent-clickjacking flag
*