mediawiki.user: Reduce repetition of code
authorhelder.wiki <helder.wiki@gmail.com>
Wed, 1 Aug 2012 15:21:36 +0000 (12:21 -0300)
committerTimo Tijhof <ttijhof@wikimedia.org>
Wed, 8 Aug 2012 03:02:40 +0000 (05:02 +0200)
commite961ca0b7346d4494884b7dcf85d495cddb1b91a
tree01434b9b1bcb862c1e39c80381cdc1610ad6d706
parente7a615ad7ccc8bb184b5edeb080fa5f713529ff5
mediawiki.user: Reduce repetition of code

Created a local utility function getUserInfo(), which is called by
both mw.user.getGroups and mw.user.getRights.

This function uses the same API request to get both pieces of
information.

Also reduces the number of jQuery.Callbacks instances by
using it directly instead of jQuery.Deffered with '.always()'.

Change-Id: I590175dba1c9761da19a84efe69a5305220d8eb7
resources/mediawiki/mediawiki.user.js