Remove reliance on Block properties being public
authorThalia <thalia.e.chan@googlemail.com>
Fri, 22 Mar 2019 15:16:40 +0000 (15:16 +0000)
committerThalia <thalia.e.chan@googlemail.com>
Fri, 22 Mar 2019 21:17:22 +0000 (21:17 +0000)
commit1b9ca741a7e1b9577e6f769813a0423b2a5707f9
tree323e9352216dd20421aee4b2ca1e5958e78a32dc
parent97cc9f6702623e1b5e346bae3458c1e40300b23e
Remove reliance on Block properties being public

Use getters and setters for $mReason, $mTimestamp, $mExpiry and
$mHideName; use Block::getType to check if a block is an autoblock
instead of checking $mAuto; no change needed for $mParentBlockId,
which is not accessed externally.

Change-Id: I767ed44ce4c2e21f53962d75fb86891add2282f6
13 files changed:
includes/Block.php
includes/api/ApiBlock.php
includes/api/ApiQueryUserInfo.php
includes/auth/AuthManager.php
includes/auth/CheckBlocksSecondaryAuthenticationProvider.php
includes/specials/SpecialBlock.php
includes/specials/SpecialUnblock.php
includes/user/User.php
tests/phpunit/includes/BlockTest.php
tests/phpunit/includes/TitlePermissionTest.php
tests/phpunit/includes/api/ApiBlockTest.php
tests/phpunit/includes/specials/SpecialBlockTest.php
tests/phpunit/includes/user/UserTest.php