The significance group comes before the lastRevision group in the UI
(because it has priority -6 vs -7), but we listed lastRevision first.
Swap them so the order in the definition matches the order in the UI.
Change-Id: I5d498bd8c7505f5cab3c89564650e0e8aaa4e117
// reviewStatus (conditional)
[
// reviewStatus (conditional)
[
- 'name' => 'lastRevision',
- 'title' => 'rcfilters-filtergroup-lastRevision',
+ 'name' => 'significance',
+ 'title' => 'rcfilters-filtergroup-significance',
'class' => ChangesListBooleanFilterGroup::class,
'class' => ChangesListBooleanFilterGroup::class,
- 'name' => 'hidelastrevision',
- 'label' => 'rcfilters-filter-lastrevision-label',
- 'description' => 'rcfilters-filter-lastrevision-description',
+ 'name' => 'hideminor',
+ 'label' => 'rcfilters-filter-minor-label',
+ 'description' => 'rcfilters-filter-minor-description',
+ // rcshowhideminor-show, rcshowhideminor-hide,
+ // wlshowhideminor
+ 'showHideSuffix' => 'showhideminor',
'default' => false,
'queryCallable' => function ( $specialClassName, $ctx, $dbr, &$tables, &$fields, &$conds,
&$query_options, &$join_conds ) {
'default' => false,
'queryCallable' => function ( $specialClassName, $ctx, $dbr, &$tables, &$fields, &$conds,
&$query_options, &$join_conds ) {
- $conds[] = 'rc_this_oldid <> page_latest';
+
+ $conds[] = 'rc_minor = 0';
- 'cssClassSuffix' => 'last',
+ 'cssClassSuffix' => 'minor',
'isRowApplicableCallable' => function ( $ctx, $rc ) {
'isRowApplicableCallable' => function ( $ctx, $rc ) {
- return $rc->getAttribute( 'rc_this_oldid' ) === $rc->getAttribute( 'page_latest' );
+ return $rc->getAttribute( 'rc_minor' );
- 'name' => 'hidepreviousrevisions',
- 'label' => 'rcfilters-filter-previousrevision-label',
- 'description' => 'rcfilters-filter-previousrevision-description',
+ 'name' => 'hidemajor',
+ 'label' => 'rcfilters-filter-major-label',
+ 'description' => 'rcfilters-filter-major-description',
'default' => false,
'queryCallable' => function ( $specialClassName, $ctx, $dbr, &$tables, &$fields, &$conds,
&$query_options, &$join_conds ) {
'default' => false,
'queryCallable' => function ( $specialClassName, $ctx, $dbr, &$tables, &$fields, &$conds,
&$query_options, &$join_conds ) {
- $conds[] = 'rc_this_oldid = page_latest';
+
+ $conds[] = 'rc_minor = 1';
- 'cssClassSuffix' => 'previous',
+ 'cssClassSuffix' => 'major',
'isRowApplicableCallable' => function ( $ctx, $rc ) {
'isRowApplicableCallable' => function ( $ctx, $rc ) {
- return $rc->getAttribute( 'rc_this_oldid' ) !== $rc->getAttribute( 'page_latest' );
+ return !$rc->getAttribute( 'rc_minor' );
- 'name' => 'significance',
- 'title' => 'rcfilters-filtergroup-significance',
+ 'name' => 'lastRevision',
+ 'title' => 'rcfilters-filtergroup-lastRevision',
'class' => ChangesListBooleanFilterGroup::class,
'class' => ChangesListBooleanFilterGroup::class,
- 'name' => 'hideminor',
- 'label' => 'rcfilters-filter-minor-label',
- 'description' => 'rcfilters-filter-minor-description',
- // rcshowhideminor-show, rcshowhideminor-hide,
- // wlshowhideminor
- 'showHideSuffix' => 'showhideminor',
+ 'name' => 'hidelastrevision',
+ 'label' => 'rcfilters-filter-lastrevision-label',
+ 'description' => 'rcfilters-filter-lastrevision-description',
'default' => false,
'queryCallable' => function ( $specialClassName, $ctx, $dbr, &$tables, &$fields, &$conds,
&$query_options, &$join_conds ) {
'default' => false,
'queryCallable' => function ( $specialClassName, $ctx, $dbr, &$tables, &$fields, &$conds,
&$query_options, &$join_conds ) {
-
- $conds[] = 'rc_minor = 0';
+ $conds[] = 'rc_this_oldid <> page_latest';
- 'cssClassSuffix' => 'minor',
+ 'cssClassSuffix' => 'last',
'isRowApplicableCallable' => function ( $ctx, $rc ) {
'isRowApplicableCallable' => function ( $ctx, $rc ) {
- return $rc->getAttribute( 'rc_minor' );
+ return $rc->getAttribute( 'rc_this_oldid' ) === $rc->getAttribute( 'page_latest' );
- 'name' => 'hidemajor',
- 'label' => 'rcfilters-filter-major-label',
- 'description' => 'rcfilters-filter-major-description',
+ 'name' => 'hidepreviousrevisions',
+ 'label' => 'rcfilters-filter-previousrevision-label',
+ 'description' => 'rcfilters-filter-previousrevision-description',
'default' => false,
'queryCallable' => function ( $specialClassName, $ctx, $dbr, &$tables, &$fields, &$conds,
&$query_options, &$join_conds ) {
'default' => false,
'queryCallable' => function ( $specialClassName, $ctx, $dbr, &$tables, &$fields, &$conds,
&$query_options, &$join_conds ) {
-
- $conds[] = 'rc_minor = 1';
+ $conds[] = 'rc_this_oldid = page_latest';
- 'cssClassSuffix' => 'major',
+ 'cssClassSuffix' => 'previous',
'isRowApplicableCallable' => function ( $ctx, $rc ) {
'isRowApplicableCallable' => function ( $ctx, $rc ) {
- return !$rc->getAttribute( 'rc_minor' );
+ return $rc->getAttribute( 'rc_this_oldid' ) !== $rc->getAttribute( 'page_latest' );