private $params, $prefixMode, $userprefix, $multiUserMode, $usernames, $parentLens;
private $fld_ids = false, $fld_title = false, $fld_timestamp = false,
- $fld_comment = false, $fld_parsedcomment = false, $fld_flags = false,
- $fld_patrolled = false, $fld_tags = false, $fld_size = false, $fld_sizediff = false;
+ $fld_comment = false, $fld_parsedcomment = false, $fld_flags = false,
+ $fld_patrolled = false, $fld_tags = false, $fld_size = false, $fld_sizediff = false;
public function execute() {
// Parse some parameters
// Fetch each row
foreach ( $res as $row ) {
- if ( ++ $count > $limit ) {
- // We've reached the one extra which shows that there are additional pages to be had. Stop here...
+ if ( ++$count > $limit ) {
+ // We've reached the one extra which shows that there are
+ // additional pages to be had. Stop here...
if ( $this->multiUserMode ) {
$this->setContinueEnumParameter( 'continue', $this->continueStr( $row ) );
} else {
}
}
- $this->getResult()->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'item' );
+ $this->getResult()->setIndexedTagName_internal(
+ array( 'query', $this->getModuleName() ),
+ 'item'
+ );
}
/**
}
// We only want pages by the specified users.
if ( $this->prefixMode ) {
- $this->addWhere( 'rev_user_text' . $this->getDB()->buildLike( $this->userprefix, $this->getDB()->anyString() ) );
+ $this->addWhere( 'rev_user_text' .
+ $this->getDB()->buildLike( $this->userprefix, $this->getDB()->anyString() ) );
} else {
$this->addWhereFld( 'rev_user_text', $this->usernames );
}
if ( !is_null( $show ) ) {
$show = array_flip( $show );
if ( ( isset( $show['minor'] ) && isset( $show['!minor'] ) )
- || ( isset( $show['patrolled'] ) && isset( $show['!patrolled'] ) ) ) {
+ || ( isset( $show['patrolled'] ) && isset( $show['!patrolled'] ) )
+ ) {
$this->dieUsageMsg( 'show' );
}
) );
if ( isset( $show['patrolled'] ) || isset( $show['!patrolled'] ) ||
- $this->fld_patrolled ) {
+ $this->fld_patrolled
+ ) {
if ( !$user->useRCPatrol() && !$user->useNPPatrol() ) {
- $this->dieUsage( 'You need the patrol right to request the patrolled flag', 'permissiondenied' );
+ $this->dieUsage(
+ 'You need the patrol right to request the patrolled flag',
+ 'permissiondenied'
+ );
}
// Use a redundant join condition on both
if ( $this->fld_tags ) {
$this->addTables( 'tag_summary' );
- $this->addJoinConds( array( 'tag_summary' => array( 'LEFT JOIN', array( 'rev_id=ts_rev_id' ) ) ) );
+ $this->addJoinConds(
+ array( 'tag_summary' => array( 'LEFT JOIN', array( 'rev_id=ts_rev_id' ) ) )
+ );
$this->addFields( 'ts_tags' );
}
if ( isset( $this->params['tag'] ) ) {
$this->addTables( 'change_tag' );
- $this->addJoinConds( array( 'change_tag' => array( 'INNER JOIN', array( 'rev_id=ct_rev_id' ) ) ) );
+ $this->addJoinConds(
+ array( 'change_tag' => array( 'INNER JOIN', array( 'rev_id=ct_rev_id' ) ) )
+ );
$this->addWhereFld( 'ct_tag', $this->params['tag'] );
- global $wgOldChangeTagsIndex;
- $index['change_tag'] = $wgOldChangeTagsIndex ? 'ct_tag' : 'change_tag_tag_id';
+ $index['change_tag'] = 'change_tag_tag_id';
}
if ( $this->params['toponly'] ) {
$vals['size'] = intval( $row->rev_len );
}
- if ( $this->fld_sizediff && !is_null( $row->rev_len ) && !is_null( $row->rev_parent_id ) ) {
- $parentLen = isset( $this->parentLens[$row->rev_parent_id] ) ? $this->parentLens[$row->rev_parent_id] : 0;
+ if ( $this->fld_sizediff
+ && !is_null( $row->rev_len )
+ && !is_null( $row->rev_parent_id )
+ ) {
+ $parentLen = isset( $this->parentLens[$row->rev_parent_id] )
+ ? $this->parentLens[$row->rev_parent_id]
+ : 0;
$vals['sizediff'] = intval( $row->rev_len - $parentLen );
}
public function getParamDescription() {
global $wgRCMaxAge;
$p = $this->getModulePrefix();
+
return array(
'limit' => 'The maximum number of contributions to return',
'start' => 'The start timestamp to return from',
'end' => 'The end timestamp to return to',
'continue' => 'When more results are available, use this to continue',
'user' => 'The users to retrieve contributions for',
- 'userprefix' => "Retrieve contributions for all users whose names begin with this value. Overrides {$p}user",
+ 'userprefix' => array(
+ "Retrieve contributions for all users whose names begin with this value.",
+ "Overrides {$p}user",
+ ),
'dir' => $this->getDirectionDescription( $p ),
'namespace' => 'Only list contributions in these namespaces',
'prop' => array(
' patrolled - Tags patrolled edits',
' tags - Lists tags for the edit',
),
- 'show' => array( "Show only items that meet this criteria, e.g. non minor edits only: {$p}show=!minor",
- "NOTE: if {$p}show=patrolled or {$p}show=!patrolled is set, revisions older than \$wgRCMaxAge ($wgRCMaxAge) won't be shown", ),
+ 'show' => array(
+ "Show only items that meet thse criteria, e.g. non minor edits only: {$p}show=!minor",
+ "NOTE: If {$p}show=patrolled or {$p}show=!patrolled is set, revisions older than",
+ "\$wgRCMaxAge ($wgRCMaxAge) won't be shown",
+ ),
'tag' => 'Only list revisions tagged with this tag',
'toponly' => 'Only list changes which are the latest revision',
);
array( 'code' => 'param_user', 'info' => 'User parameter may not be empty.' ),
array( 'code' => 'param_user', 'info' => 'User name user is not valid' ),
array( 'show' ),
- array( 'code' => 'permissiondenied', 'info' => 'You need the patrol right to request the patrolled flag' ),
+ array(
+ 'code' => 'permissiondenied',
+ 'info' => 'You need the patrol right to request the patrolled flag'
+ ),
) );
}