diff options
Diffstat (limited to 'includes/api/ApiQueryAllUsers.php')
-rw-r--r-- | includes/api/ApiQueryAllUsers.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/includes/api/ApiQueryAllUsers.php b/includes/api/ApiQueryAllUsers.php index 0cea84f8..eb3e5537 100644 --- a/includes/api/ApiQueryAllUsers.php +++ b/includes/api/ApiQueryAllUsers.php @@ -41,7 +41,7 @@ class ApiQueryAllUsers extends ApiQueryBase { * @return string */ private function getCanonicalUserName( $name ) { - return str_replace( '_', ' ', $name ); + return strtr( $name, '_', ' ' ); } public function execute() { @@ -235,14 +235,14 @@ class ApiQueryAllUsers extends ApiQueryBase { } $data = array( - 'userid' => $row->user_id, + 'userid' => (int)$row->user_id, 'name' => $row->user_name, ); if ( $fld_blockinfo && !is_null( $row->ipb_by_text ) ) { - $data['blockid'] = $row->ipb_id; + $data['blockid'] = (int)$row->ipb_id; $data['blockedby'] = $row->ipb_by_text; - $data['blockedbyid'] = $row->ipb_by; + $data['blockedbyid'] = (int)$row->ipb_by; $data['blockedtimestamp'] = wfTimestamp( TS_ISO_8601, $row->ipb_timestamp ); $data['blockreason'] = $row->ipb_reason; $data['blockexpiry'] = $row->ipb_expiry; @@ -340,7 +340,8 @@ class ApiQueryAllUsers extends ApiQueryBase { 'rights', 'editcount', 'registration' - ) + ), + ApiBase::PARAM_HELP_MSG_PER_VALUE => array(), ), 'limit' => array( ApiBase::PARAM_DFLT => 10, |