Merge "SpecialWatchlist: Keep checkboxes and their labels together"
[lhc/web/wiklou.git] / includes / api / ApiQueryUserInfo.php
index e003e31..93c0dd0 100644 (file)
@@ -78,7 +78,6 @@ class ApiQueryUserInfo extends ApiQueryBase {
 
        protected function getCurrentUserInfo() {
                $user = $this->getUser();
-               $result = $this->getResult();
                $vals = array();
                $vals['id'] = intval( $user->getId() );
                $vals['name'] = $user->getName();
@@ -150,7 +149,9 @@ class ApiQueryUserInfo extends ApiQueryBase {
                        $vals['ratelimits'] = $this->getRateLimits();
                }
 
-               if ( isset( $this->prop['realname'] ) && !in_array( 'realname', $this->getConfig()->get( 'HiddenPrefs' ) ) ) {
+               if ( isset( $this->prop['realname'] ) &&
+                       !in_array( 'realname', $this->getConfig()->get( 'HiddenPrefs' ) )
+               ) {
                        $vals['realname'] = $user->getRealName();
                }
 
@@ -249,7 +250,6 @@ class ApiQueryUserInfo extends ApiQueryBase {
        public function getAllowedParams() {
                return array(
                        'prop' => array(
-                               ApiBase::PARAM_DFLT => null,
                                ApiBase::PARAM_ISMULTI => true,
                                ApiBase::PARAM_TYPE => array(
                                        'blockinfo',
@@ -268,10 +268,12 @@ class ApiQueryUserInfo extends ApiQueryBase {
                                        'registrationdate',
                                        'unreadcount',
                                ),
-                               ApiBase::PARAM_HELP_MSG => array(
-                                       'apihelp-query+userinfo-param-prop',
-                                       self::WL_UNREAD_LIMIT - 1,
-                                       self::WL_UNREAD_LIMIT . '+',
+                               ApiBase::PARAM_HELP_MSG_PER_VALUE => array(
+                                       'unreadcount' => array(
+                                               'apihelp-query+userinfo-paramvalue-prop-unreadcount',
+                                               self::WL_UNREAD_LIMIT - 1,
+                                               self::WL_UNREAD_LIMIT . '+',
+                                       ),
                                ),
                        )
                );