// Update the links tables and other secondary data
if ( $content ) {
- $updates = $content->getSecondaryDataUpdates( $this->getTitle(), null, true, $editInfo->output );
+ $recursive = $options['changed']; // bug 50785
+ $updates = $content->getSecondaryDataUpdates(
+ $this->getTitle(), null, $recursive, $editInfo->output );
DataUpdate::runUpdates( $updates );
}
$params = $this->extractRequestParams();
$forceLinkUpdate = $params['forcelinkupdate'];
+ $forceRecursiveLinkUpdate = $params['forcerecursivelinkupdate'];
$pageSet = $this->getPageSet();
$pageSet->execute();
$page->doPurge(); // Directly purge and skip the UI part of purge().
$r['purged'] = '';
- if ( $forceLinkUpdate ) {
+ if ( $forceLinkUpdate || $forceRecursiveLinkUpdate ) {
if ( !$this->getUser()->pingLimiter() ) {
global $wgEnableParserCache;
$p_result = $content->getParserOutput( $title, $page->getLatest(), $popts, $wgEnableParserCache );
# Update the links tables
- $updates = $content->getSecondaryDataUpdates( $title, null, true, $p_result );
+ $updates = $content->getSecondaryDataUpdates(
+ $title, null, $forceRecursiveLinkUpdate, $p_result );
DataUpdate::runUpdates( $updates );
$r['linkupdate'] = '';
}
public function getAllowedParams( $flags = 0 ) {
- $result = array( 'forcelinkupdate' => false );
+ $result = array(
+ 'forcelinkupdate' => false,
+ 'forcerecursivelinkupdate' => false
+ );
if ( $flags ) {
$result += $this->getPageSet()->getFinalParams( $flags );
}
public function getParamDescription() {
return $this->getPageSet()->getFinalParamDescription()
- + array( 'forcelinkupdate' => 'Update the links tables' );
+ + array(
+ 'forcelinkupdate' => 'Update the links tables',
+ 'forcerecursivelinkupdate' => 'Update the links table, and update ' .
+ 'the links tables for any page that uses this page as a template',
+ );
}
public function getResultProperties() {