* These updates add to editing time and can be done
after sending the HTTP response for performance
* Also improved the active users job insertion logic
Change-Id: I5b25217c4f08db7fa9a05eac046283f02d45865e
$this->mExtra['pageStatus'] );
}
}
$this->mExtra['pageStatus'] );
}
}
+
+ // Update the cached list of active users
+ if ( $this->mAttribs['rc_user'] > 0 ) {
+ JobQueueGroup::singleton()->lazyPush( RecentChangesUpdateJob::newCacheUpdateJob() );
+ }
// Mark as patrolled if the user can do so
$patrolled = $wgUseRCPatrol && !count(
$this->mTitle->getUserPermissionsErrors( 'autopatrol', $user ) );
// Mark as patrolled if the user can do so
$patrolled = $wgUseRCPatrol && !count(
$this->mTitle->getUserPermissionsErrors( 'autopatrol', $user ) );
// Add RC row to the DB
$rc = RecentChange::notifyEdit( $now, $this->mTitle, $isminor, $user, $summary,
$oldid, $this->getTimestamp(), $bot, '', $oldsize, $newsize,
// Add RC row to the DB
$rc = RecentChange::notifyEdit( $now, $this->mTitle, $isminor, $user, $summary,
$oldid, $this->getTimestamp(), $bot, '', $oldsize, $newsize,
$recursive = $options['changed']; // bug 50785
$updates = $content->getSecondaryDataUpdates(
$this->getTitle(), null, $recursive, $editInfo->output );
$recursive = $options['changed']; // bug 50785
$updates = $content->getSecondaryDataUpdates(
$this->getTitle(), null, $recursive, $editInfo->output );
- DataUpdate::runUpdates( $updates );
+ foreach ( $updates as $update ) {
+ DeferredUpdates::addUpdate( $update );
+ }
}
Hooks::run( 'ArticleEditUpdates', array( &$this, &$editInfo, $options['changed'] ) );
if ( Hooks::run( 'ArticleEditUpdatesDeleteFromRecentchanges', array( &$this ) ) ) {
}
Hooks::run( 'ArticleEditUpdates', array( &$this, &$editInfo, $options['changed'] ) );
if ( Hooks::run( 'ArticleEditUpdatesDeleteFromRecentchanges', array( &$this ) ) ) {
- // Update the cached list of active users
- $jobs = array( RecentChangesUpdateJob::newCacheUpdateJob() );
// Flush old entries from the `recentchanges` table
if ( mt_rand( 0, 9 ) == 0 ) {
// Flush old entries from the `recentchanges` table
if ( mt_rand( 0, 9 ) == 0 ) {
- $jobs[] = RecentChangesUpdateJob::newPurgeJob();
+ JobQueueGroup::singleton()->lazyPush( RecentChangesUpdateJob::newPurgeJob() );
-
- JobQueueGroup::singleton()->lazyPush( $jobs );
}
if ( !$this->exists() ) {
}
if ( !$this->exists() ) {
} elseif ( $options['changed'] ) { // bug 50785
self::onArticleEdit( $this->mTitle );
}
} elseif ( $options['changed'] ) { // bug 50785
self::onArticleEdit( $this->mTitle );
}