Last modified: 2011-02-24 18:47:12 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T29688, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27688 - Simplify queries to list user block information
Simplify queries to list user block information
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.18.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on: 27613
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-24 18:33 UTC by db [inactive,noenotif]
Modified: 2011-02-24 18:47 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description db [inactive,noenotif] 2011-02-24 18:33:28 UTC
Same as bug 27611:

Use field ipb_by_text of table ipblocks instead of a join with the user table to get the "blocker_name".

Thanks.
Comment 1 Sam Reed (reedy) 2011-02-24 18:36:02 UTC
I was thinking I'd already done this one, slightly confusing

		if ( $fld_blockinfo ) {
			$this->addTables( 'ipblocks' );
			$this->addTables( 'user', 'u2' );
			$u2 = $this->getAliasedName( 'user', 'u2' );
			$this->addJoinConds( array(
				'ipblocks' => array( 'LEFT JOIN', 'ipb_user=u1.user_id' ),
				$u2 => array( 'LEFT JOIN', 'ipb_by=u2.user_id' ) ) );
			$this->addFields( array( 'ipb_reason', 'u2.user_name AS blocker_name' ) );
		}

Just a case of simplifying that, and not having the 2nd join of the user table in :)
Comment 2 db [inactive,noenotif] 2011-02-24 18:37:19 UTC
year, "Mid-air collision detected!" - Edit conflict in bugzilla
----
Also for list=users&usprop=blockinfo.

Thanks.
Comment 3 Sam Reed (reedy) 2011-02-24 18:46:45 UTC
Done both in r82739, some simplfication in r82740

Also in r82739, I've exposed the block expiry information on list=users, was already there in list=allusers
Comment 4 Sam Reed (reedy) 2011-02-24 18:47:12 UTC
Bah. Marking fixed

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links