Blocks: Misc changes
* Removed un-used property * Simplified return value and swift statement Change-Id: I57db9d2f160bec5d9ae8afd6805e7ce07daf63c1
This commit is contained in:
parent
13119dc95c
commit
a822b39d33
4 changed files with 3 additions and 12 deletions
|
|
@ -290,8 +290,6 @@ abstract class AbstractBlock implements Block {
|
|||
$res = $this->isSitewide();
|
||||
break;
|
||||
case 'read':
|
||||
$res = false;
|
||||
break;
|
||||
case 'purge':
|
||||
$res = false;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -682,8 +682,6 @@ class BlockManager {
|
|||
return $id;
|
||||
}
|
||||
$hmac = MWCryptHash::hmac( $id, $this->options->get( MainConfigNames::SecretKey ), false );
|
||||
$cookieValue = $id . '!' . $hmac;
|
||||
return $cookieValue;
|
||||
return $id . '!' . $hmac;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,11 +42,6 @@ class BlockPermissionChecker {
|
|||
*/
|
||||
private $target;
|
||||
|
||||
/**
|
||||
* @var int|null One of AbstractBlock::TYPE_* constants, or null when unknown
|
||||
*/
|
||||
private $targetType = null;
|
||||
|
||||
/**
|
||||
* @var Authority Block performer
|
||||
*/
|
||||
|
|
@ -76,7 +71,7 @@ class BlockPermissionChecker {
|
|||
) {
|
||||
$options->assertRequiredOptions( self::CONSTRUCTOR_OPTIONS );
|
||||
$this->options = $options;
|
||||
[ $this->target, $this->targetType ] = $blockUtils->parseBlockTarget( $target );
|
||||
[ $this->target, ] = $blockUtils->parseBlockTarget( $target );
|
||||
$this->performer = $performer;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ class DatabaseBlock extends AbstractBlock {
|
|||
|
||||
$options += $defaults;
|
||||
|
||||
if ( $options['by'] && $options['by'] instanceof UserIdentity ) {
|
||||
if ( $options['by'] instanceof UserIdentity ) {
|
||||
$this->setBlocker( $options['by'] );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue