r41784 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41783‎ | r41784 | r41785 >
Date:23:21, 6 October 2008
Author:aaron
Status:old (Comments)
Tags:
Comment:
Query and UI cleanup
Modified paths:
  • /trunk/phase3/includes/specials/SpecialIpblocklist.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialIpblocklist.php
@@ -269,7 +269,7 @@
270270 $conds['ipb_expiry'] = 'infinity';
271271 }
272272 if( $this->hideaddressblocks ) {
273 - $conds[] = "ipb_range_end > ipb_range_start";
 273+ $conds[] = "ipb_user != 0 OR ipb_range_end > ipb_range_start";
274274 }
275275
276276 $pager = new IPBlocklistPager( $this, $conds );
@@ -285,6 +285,7 @@
286286 $wgOut->addHTML( $this->searchForm() );
287287 $wgOut->addWikiMsg( 'ipblocklist-no-results' );
288288 } else {
 289+ $wgOut->addHTML( $this->searchForm() . $this->showhideLinks() );
289290 $wgOut->addWikiMsg( 'ipblocklist-empty' );
290291 }
291292 }

Comments

#Comment by Brion VIBBER (talk | contribs)   23:45, 6 October 2008

What does the query change accomplish?

#Comment by Voice of All (talk | contribs)   23:46, 6 October 2008

Siebrand pointed out that just having "single IP blocks" hidden also makes user blocks hidden, which was wrong.

#Comment by Brion VIBBER (talk | contribs)   23:52, 6 October 2008

Hrm. Is it wrong? If the point is to show only range blocks, user blocks should indeed not be shown.

#Comment by Voice of All (talk | contribs)   00:00, 7 October 2008

Well the wording is 'Hide single IP blocks', so they *should* be shown

#Comment by Brion VIBBER (talk | contribs)   00:06, 7 October 2008

Ok, makes sense in context.

Status & tagging log