replaced by a repository service later):
$updater = $page->newPageUpdater( $user );
- $updater->setContent( 'main', $content );
+ $updater->setContent( SlotRecord::MAIN, $content );
$updater->setRcPatrolStatus( RecentChange::PRC_PATROLLED );
$newRev = $updater->saveRevision( $comment );
$updater = $page->newPageUpdater( $user );
$parent = $updater->grabParentRevision();
- $content = $parent->getContent( 'main' )->replaceSection( $section, $sectionContent );
- $updater->setContent( 'main', $content );
+ $content = $parent->getContent( SlotRecord::MAIN )->replaceSection( $section, $sectionContent );
+ $updater->setContent( SlotRecord::MAIN, $content );
$newRev = $updater->saveRevision( $comment, EDIT_UPDATE );
In both cases, all secondary updates will be triggered automatically.
Calling it again with mismatching parameters, or calling it with parameters mismatching
the ones prepareContent() was called with, triggers a LogicException.
-- getSecondaryDataUpdtes() returns DataUpdates that represent derived data for the revision.
+- getSecondaryDataUpdates() returns DataUpdates that represent derived data for the revision.
These may be used to update such data, e.g. in ApiPurge, RefreshLinksJob, and the refreshLinks
script.
-- doUpdates() triggers the updates defined by getSecondaryDataUpdtes(), and also causes
+- doUpdates() triggers the updates defined by getSecondaryDataUpdates(), and also causes
updates to cached artifacts in the ParserCache, the CDN layer, etc. This is primarily
used by PageUpdater, but also by PageArchive during undeletion, and when importing
revisions from XML. doUpdates() can only be called after prepareUpdate() was used to