MediaWikiServices::getInstance()->getDBLoadBalancerFactory()
);
+ $derivedDataUpdater->setLogger( LoggerFactory::getInstance( 'SaveParse' ) );
$derivedDataUpdater->setRcWatchCategoryMembership( $wgRCWatchCategoryMembership );
$derivedDataUpdater->setArticleCountMethod( $wgArticleCountMethod );
// TODO: this logic should not be in the storage layer, it's here for compatibility
// with 1.31 behavior. Applying the 'autopatrol' right should be done in the same
// place the 'bot' right is handled, which is currently in EditPage::attemptSave.
- if ( $needsPatrol && $this->getTitle()->userCan( 'autopatrol', $user ) ) {
+ $permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
+
+ if ( $needsPatrol && $permissionManager->userCan(
+ 'autopatrol', $user, $this->getTitle()
+ ) ) {
$updater->setRcPatrolStatus( RecentChange::PRC_AUTOPATROLLED );
}
* - defer: one of the DeferredUpdates constants, or false to run immediately (default: false).
* Note that even when this is set to false, some updates might still get deferred (as
* some update might directly add child updates to DeferredUpdates).
+ * - known-revision-output: a combined canonical ParserOutput for the revision, perhaps
+ * from some cache. The caller is responsible for ensuring that the ParserOutput indeed
+ * matched the $rev and $options. This mechanism is intended as a temporary stop-gap,
+ * for the time until caches have been changed to store RenderedRevision states instead
+ * of ParserOutput objects. (default: null) (since 1.33)
* @since 1.32
*/
public function doSecondaryDataUpdates( array $options = [] ) {
$status->value = $logid;
// Show log excerpt on 404 pages rather than just a link
- $cache = MediaWikiServices::getInstance()->getMainObjectStash();
- $key = $cache->makeKey( 'page-recent-delete', md5( $logTitle->getPrefixedText() ) );
- $cache->set( $key, 1, $cache::TTL_DAY );
+ $dbCache = ObjectCache::getInstance( 'db-replicated' );
+ $key = $dbCache->makeKey( 'page-recent-delete', md5( $logTitle->getPrefixedText() ) );
+ $dbCache->set( $key, 1, $dbCache::TTL_DAY );
}
return $status;
* (with ChangeTags::canAddTagsAccompanyingChange)
*
* @return array Array of errors, each error formatted as
- * array(messagekey, param1, param2, ...).
+ * [ messagekey, param1, param2, ... ].
* On success, the array is empty. This array can also be passed to
* OutputPage::showPermissionsErrorPage().
*/
// TODO: this logic should not be in the storage layer, it's here for compatibility
// with 1.31 behavior. Applying the 'autopatrol' right should be done in the same
// place the 'bot' right is handled, which is currently in EditPage::attemptSave.
- if ( $wgUseRCPatrol && $this->getTitle()->userCan( 'autopatrol', $guser ) ) {
+ $permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
+
+ if ( $wgUseRCPatrol && $permissionManager->userCan(
+ 'autopatrol', $guser, $this->getTitle()
+ ) ) {
$updater->setRcPatrolStatus( RecentChange::PRC_AUTOPATROLLED );
}