X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FBlock.php;h=a7d89e23cd0f93801eaf0440d5a714a61d72b2b0;hb=938dbc42b33a966efeaa94c80a70b2eb4908d1a2;hp=9567b06803accdde75e7fdc4542b35be32e256c6;hpb=e9ed100496b388a31ac2af0deabcc9754984d09d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Block.php b/includes/Block.php index 9567b06803..a7d89e23cd 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -224,7 +224,7 @@ class Block { 'ipb_address', 'ipb_by', 'ipb_by_text', - 'ipb_by_actor' => $wgActorTableSchemaMigrationStage > MIGRATION_OLD ? 'ipb_by_actor' : null, + 'ipb_by_actor' => $wgActorTableSchemaMigrationStage > MIGRATION_OLD ? 'ipb_by_actor' : 'NULL', 'ipb_timestamp', 'ipb_auto', 'ipb_anon_only', @@ -299,7 +299,7 @@ class Block { * 1) A block directly on the given user or IP * 2) A rangeblock encompassing the given IP (smallest first) * 3) An autoblock on the given IP - * @param User|string $vagueTarget Also search for blocks affecting this target. Doesn't + * @param User|string|null $vagueTarget Also search for blocks affecting this target. Doesn't * make any sense to use TYPE_AUTO / TYPE_ID here. Leave blank to skip IP lookups. * @throws MWException * @return bool Whether a relevant block was found @@ -405,7 +405,7 @@ class Block { /** * Get a set of SQL conditions which will select rangeblocks encompassing a given range * @param string $start Hexadecimal IP representation - * @param string $end Hexadecimal IP representation, or null to use $start = $end + * @param string|null $end Hexadecimal IP representation, or null to use $start = $end * @return string */ public static function getRangeCond( $start, $end = null ) { @@ -519,7 +519,7 @@ class Block { * Insert a block into the block table. Will fail if there is a conflicting * block (same name and options) already in the database. * - * @param IDatabase $dbw If you have one available + * @param IDatabase|null $dbw If you have one available * @return bool|array False on failure, assoc array on success: * ('id' => block ID, 'autoIds' => array of autoblock IDs) */ @@ -1162,7 +1162,7 @@ class Block { * Calling this with a user, IP address or range will not select autoblocks, and will * only select a block where the targets match exactly (so looking for blocks on * 1.2.3.4 will not select 1.2.0.0/16 or even 1.2.3.4/32) - * @param string|User|int $vagueTarget As above, but we will search for *any* block which + * @param string|User|int|null $vagueTarget As above, but we will search for *any* block which * affects that target (so for an IP address, get ranges containing that IP; and also * get any relevant autoblocks). Leave empty or blank to skip IP-based lookups. * @param bool $fromMaster Whether to use the DB_MASTER database @@ -1641,7 +1641,7 @@ class Block { $reason, $context->getRequest()->getIP(), $this->getByName(), - $systemBlockType !== null ? $systemBlockType : $this->getId(), + $systemBlockType ?? $this->getId(), $lang->formatExpiry( $this->mExpiry ), (string)$intended, $lang->userTimeAndDate( $this->mTimestamp, $context->getUser() ),