Cast various things that are supposed to be ints
authorBrad Jorsch <bjorsch@wikimedia.org>
Wed, 6 May 2015 15:33:08 +0000 (11:33 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Wed, 6 May 2015 15:40:41 +0000 (11:40 -0400)
commita90cbb48f82726857de2384b2932c640a404bc84
treeac9afbf0cd3db77576ee8b46ebe693db1e867724
parentc6ea60543b7b5a2cfca9a6a9bf99f5dfc2f45435
Cast various things that are supposed to be ints

Mysqli is returning SELECTed ints as strings rather than as ints, I'm
guessing to avoid problems with 64-bit int types on 32-bit systems. PHP
mostly doesn't care, but it causes API JSON output to have strings
instead of ints all over the place.

This also fixes ForeignAPIFile::getUser( 'id' ) returning the user
*name*.

Bug: T98276
Change-Id: Ie6591d72b3ac40172f8176a8ca8b6fad8e9275a5
16 files changed:
includes/Block.php
includes/api/ApiQueryAllUsers.php
includes/api/ApiQueryBacklinksprop.php
includes/api/ApiQueryBlocks.php
includes/api/ApiQueryContributors.php
includes/api/ApiQueryDeletedrevs.php
includes/api/ApiQueryFilearchive.php
includes/api/ApiQueryProtectedTitles.php
includes/api/ApiQueryRecentChanges.php
includes/api/ApiQueryUserContributions.php
includes/api/ApiQueryUsers.php
includes/api/ApiQueryWatchlist.php
includes/db/DatabaseMysqli.php
includes/filerepo/file/ArchivedFile.php
includes/filerepo/file/ForeignAPIFile.php
includes/filerepo/file/LocalFile.php