public static function newFromConds(
$conds,
$fname = __METHOD__,
- $dbType = DB_SLAVE
+ $dbType = DB_REPLICA
) {
$db = wfGetDB( $dbType );
$row = $db->selectRow( 'recentchanges', self::selectFields(), $conds, $fname );
'pageStatus' => 'changed'
];
- DeferredUpdates::addCallableUpdate( function() use ( $rc, $tags ) {
- $rc->save();
- if ( $rc->mAttribs['rc_patrolled'] ) {
- PatrolLog::record( $rc, true, $rc->getPerformer() );
- }
- if ( count( $tags ) ) {
- ChangeTags::addTags( $tags, $rc->mAttribs['rc_id'],
- $rc->mAttribs['rc_this_oldid'], null, null );
- }
- } );
+ DeferredUpdates::addCallableUpdate(
+ function () use ( $rc, $tags ) {
+ $rc->save();
+ if ( $rc->mAttribs['rc_patrolled'] ) {
+ PatrolLog::record( $rc, true, $rc->getPerformer() );
+ }
+ if ( count( $tags ) ) {
+ ChangeTags::addTags( $tags, $rc->mAttribs['rc_id'],
+ $rc->mAttribs['rc_this_oldid'], null, null );
+ }
+ },
+ DeferredUpdates::POSTSEND,
+ wfGetDB( DB_MASTER )
+ );
return $rc;
}
'pageStatus' => 'created'
];
- DeferredUpdates::addCallableUpdate( function() use ( $rc, $tags ) {
- $rc->save();
- if ( $rc->mAttribs['rc_patrolled'] ) {
- PatrolLog::record( $rc, true, $rc->getPerformer() );
- }
- if ( count( $tags ) ) {
- ChangeTags::addTags( $tags, $rc->mAttribs['rc_id'],
- $rc->mAttribs['rc_this_oldid'], null, null );
- }
- } );
+ DeferredUpdates::addCallableUpdate(
+ function () use ( $rc, $tags ) {
+ $rc->save();
+ if ( $rc->mAttribs['rc_patrolled'] ) {
+ PatrolLog::record( $rc, true, $rc->getPerformer() );
+ }
+ if ( count( $tags ) ) {
+ ChangeTags::addTags( $tags, $rc->mAttribs['rc_id'],
+ $rc->mAttribs['rc_this_oldid'], null, null );
+ }
+ },
+ DeferredUpdates::POSTSEND,
+ wfGetDB( DB_MASTER )
+ );
return $rc;
}
'rc_logid' => 0,
'rc_log_type' => null,
'rc_log_action' => '',
- 'rc_params' => ''
+ 'rc_params' => serialize( [
+ 'hidden-cat' => WikiCategoryPage::factory( $categoryTitle )->isHidden()
+ ] )
];
$rc->mExtra = [
return $rc;
}
+ /**
+ * Get a parameter value
+ *
+ * @since 1.27
+ *
+ * @param string $name parameter name
+ * @return mixed
+ */
+ public function getParam( $name ) {
+ $params = $this->parseParams();
+ return isset( $params[$name] ) ? $params[$name] : null;
+ }
+
/**
* Initialises the members of this object from a mysql row object
*