Don't return the status of doBlockInternal when processing block actions

This will not be correct if the target already has a partial block
applied (which is very rare BTW). Leaving a TODO because this is low
priority.

Also keep returning the status in tests, because it makes tests easier
to write.

Change-Id: Ifac795125927d584a31d95e1b4c4241eef860fa1
This commit is contained in:
Daimona Eaytoy 2021-01-19 15:26:20 +01:00
parent 2e72e3a952
commit 0a45c0abc8

View file

@ -57,7 +57,9 @@ class Block extends BlockingConsequence implements ReversibleConsequence {
$autoblock = true,
$this->preventsTalkEdit
);
return $status->isOK();
// TODO: Should we reblock in case of partial blocks? At that point we could return
// the status of doBlockInternal
return defined( 'MW_PHPUNIT_TEST' ) ? $status->isOK() : true;
}
/**