$opts->add( 'hideliu', false );
$opts->add( 'hidepatrolled', false );
$opts->add( 'hidebots', false );
+ $opts->add( 'hideredirs', true );
$opts->add( 'limit', (int)$wgUser->getOption( 'rclimit' ) );
$opts->add( 'offset', '' );
$opts->add( 'namespace', '0' );
$this->opts->setValue( 'hidepatrolled', true );
if ( 'hidebots' == $bit )
$this->opts->setValue( 'hidebots', true );
+ if ( 'showredirs' == $bit )
+ $this->opts->setValue( 'hideredirs', false );
if ( is_numeric( $bit ) )
$this->opts->setValue( 'limit', intval( $bit ) );
$filters = array(
'hideliu' => 'rcshowhideliu',
'hidepatrolled' => 'rcshowhidepatr',
- 'hidebots' => 'rcshowhidebots'
+ 'hidebots' => 'rcshowhidebots',
+ 'hideredirs' => 'newpages-showhideredirs'
);
// Disable some if needed
$self = $this->getTitle();
foreach ( $filters as $key => $msg ) {
$onoff = 1 - $this->opts->getValue($key);
- $link = $this->skin->makeKnownLinkObj( $self, $showhide[$onoff],
- wfArrayToCGI( array( $key => $onoff ), $changed )
+ $link = $this->skin->link( $self, $showhide[$onoff], array(),
+ array( $key => $onoff ) + $changed
);
$links[$key] = wfMsgHtml( $msg, $link );
}
// Stored opts
protected $opts, $mForm;
- private $hideliu, $hidepatrolled, $hidebots, $namespace, $user, $spTitle;
-
function __construct( $form, FormOptions $opts ) {
parent::__construct();
$this->mForm = $form;
$rcIndexes = array( 'rc_timestamp' );
}
$conds[] = 'page_id = rc_cur_id';
- $conds['page_is_redirect'] = 0;
+
# $wgEnableNewpagesUserFilter - temp WMF hack
if( $wgEnableNewpagesUserFilter && $user ) {
$conds['rc_user_text'] = $user->getText();
$conds['rc_bot'] = 0;
}
+ if ( $this->opts->getValue( 'hideredirs' ) ) {
+ $conds['page_is_redirect'] = 0;
+ }
+
return array(
'tables' => array( 'recentchanges', 'page' ),
'fields' => 'rc_namespace,rc_title, rc_cur_id, rc_user,rc_user_text,rc_comment,