$wgPasswordExpirationDays configuration setting.
* Add new hook SendWatchlistEmailNotification, this will be used to determine
whether to send a watchlist email notification.
+* (bug 42026) Special:Contributions now includes an option to filter page
+ creations, similar to the topOnly option.
=== Bug fixes in 1.23 ===
* (bug 41759) The "updated since last visit" markers (on history pages, recent
* Added llprop=langname and llprop=autonym for action=query&prop=langlinks.
* prop=redirects is added, to return redirects to the pages in the query.
* list=allredirects is added, to list all redirects pointing to a namespace.
+* (bug 42026) Added ucshow={new,!new,top,!top} to list=usercontribs.
+ Also added newonly to action=feedcontributions.
+* (bug 42026) Deprecated uctoponly in favor of ucshow=top.
=== Languages updated in 1.23 ===
'tagFilter' => $params['tagfilter'],
'deletedOnly' => $params['deletedonly'],
'topOnly' => $params['toponly'],
+ 'newOnly' => $params['newonly'],
'showSizeDiff' => $params['showsizediff'],
) );
),
'deletedonly' => false,
'toponly' => false,
+ 'newonly' => false,
'showsizediff' => false,
);
}
'tagfilter' => 'Filter contributions that have these tags',
'deletedonly' => 'Show only deleted contributions',
'toponly' => 'Only show edits that are latest revisions',
+ 'newonly' => 'Only show edits that are page creations',
'showsizediff' => 'Show the size difference between revisions. Disabled in Miser Mode',
);
}
$this->addWhereFld( 'page_namespace', $this->params['namespace'] );
$show = $this->params['show'];
+ if ( $this->params['toponly'] ) { // deprecated/old param
+ $show[] = 'top';
+ }
if ( !is_null( $show ) ) {
$show = array_flip( $show );
+
if ( ( isset( $show['minor'] ) && isset( $show['!minor'] ) )
|| ( isset( $show['patrolled'] ) && isset( $show['!patrolled'] ) )
+ || ( isset( $show['top'] ) && isset( $show['!top'] ) )
+ || ( isset( $show['new'] ) && isset( $show['!new'] ) )
) {
$this->dieUsageMsg( 'show' );
}
$this->addWhereIf( 'rev_minor_edit != 0', isset( $show['minor'] ) );
$this->addWhereIf( 'rc_patrolled = 0', isset( $show['!patrolled'] ) );
$this->addWhereIf( 'rc_patrolled != 0', isset( $show['patrolled'] ) );
+ $this->addWhereIf( 'rev_id != page_latest', isset( $show['!top'] ) );
+ $this->addWhereIf( 'rev_id = page_latest', isset( $show['top'] ) );
+ $this->addWhereIf( 'rev_parent_id != 0', isset( $show['!new'] ) );
+ $this->addWhereIf( 'rev_parent_id = 0', isset( $show['new'] ) );
}
$this->addOption( 'LIMIT', $this->params['limit'] + 1 );
$index = array( 'revision' => 'usertext_timestamp' );
$this->addWhereFld( 'ct_tag', $this->params['tag'] );
}
- if ( $this->params['toponly'] ) {
- $this->addWhere( 'rev_id = page_latest' );
- }
-
$this->addOption( 'USE INDEX', $index );
}
'!minor',
'patrolled',
'!patrolled',
+ 'top',
+ '!top',
+ 'new',
+ '!new',
)
),
'tag' => null,
- 'toponly' => false,
+ 'toponly' => array(
+ ApiBase::PARAM_DFLT => false,
+ ApiBase::PARAM_DEPRECATED => true,
+ ),
);
}
$this->opts['limit'] = $request->getInt( 'limit', $user->getOption( 'rclimit' ) );
$this->opts['target'] = $target;
$this->opts['topOnly'] = $request->getBool( 'topOnly' );
+ $this->opts['newOnly'] = $request->getBool( 'newOnly' );
$nt = Title::makeTitleSafe( NS_USER, $target );
if ( !$nt ) {
if ( $this->opts['topOnly'] ) {
$feedParams['toponly'] = true;
}
+ if ( $this->opts['newOnly'] ) {
+ $feedParams['newonly'] = true;
+ }
if ( $this->opts['deletedOnly'] ) {
$feedParams['deletedonly'] = true;
}
'month' => $this->opts['month'],
'deletedOnly' => $this->opts['deletedOnly'],
'topOnly' => $this->opts['topOnly'],
+ 'newOnly' => $this->opts['newOnly'],
'nsInvert' => $this->opts['nsInvert'],
'associated' => $this->opts['associated'],
) );
$this->opts['topOnly'] = false;
}
+ if ( !isset( $this->opts['newOnly'] ) ) {
+ $this->opts['newOnly'] = false;
+ }
+
$form = Html::openElement(
'form',
array(
'year',
'month',
'topOnly',
+ 'newOnly',
'associated'
);
array( 'class' => 'mw-input' )
)
);
+ $checkLabelNewOnly = Html::rawElement(
+ 'span',
+ array( 'style' => 'white-space: nowrap' ),
+ Xml::checkLabel(
+ $this->msg( 'sp-contributions-newonly' )->text(),
+ 'newOnly',
+ 'mw-show-new-only',
+ $this->opts['newOnly'],
+ array( 'class' => 'mw-input' )
+ )
+ );
$extraOptions = Html::rawElement(
'td',
array( 'colspan' => 2 ),
- $deletedOnlyCheck . $checkLabelTopOnly
+ $deletedOnlyCheck . $checkLabelTopOnly . $checkLabelNewOnly
);
$dateSelectionAndSubmit = Xml::tags( 'td', array( 'colspan' => 2 ),
$this->deletedOnly = !empty( $options['deletedOnly'] );
$this->topOnly = !empty( $options['topOnly'] );
+ $this->newOnly = !empty( $options['newOnly'] );
$year = isset( $options['year'] ) ? $options['year'] : false;
$month = isset( $options['month'] ) ? $options['month'] : false;
$condition[] = 'rev_id = page_latest';
}
+ if ( $this->newOnly ) {
+ $condition[] = 'rev_parent_id = 0';
+ }
+
return array( $tables, $index, $condition, $join_conds );
}
'sp-contributions-search' => 'Search for contributions',
'sp-contributions-username' => 'IP address or username:',
'sp-contributions-toponly' => 'Only show edits that are latest revisions',
+'sp-contributions-newonly' => 'Only show edits that are page creations',
'sp-contributions-submit' => 'Search',
'sp-contributions-explain' => '', # only translate this message to other languages if you have to change it
'sp-contributions-footer' => '-', # do not translate or duplicate this message to other languages
'sp-contributions-username' => 'This message appears whenever someone requests [[Special:Contributions]].
{{Identical|IP address or username}}',
'sp-contributions-toponly' => '"top revision" means the "latest revision"',
+'sp-contributions-newonly' => '"page creation" means the "first revision" of a page',
'sp-contributions-submit' => '{{Identical|Search}}',
'sp-contributions-explain' => '{{optional}}',
'sp-contributions-search',
'sp-contributions-username',
'sp-contributions-toponly',
+ 'sp-contributions-newonly',
'sp-contributions-submit',
'sp-contributions-explain',
'sp-contributions-footer',