X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FBlock.php;h=aaabec92911a154cb6d5586099b5a41ec9e5e65b;hb=4c0f5ab1dae6481fd5cbe7308ea76a7100575f3e;hp=3896369ce4dc62edd3d7c7922bbb8973cd3f192f;hpb=5f56facb3d87556264ac5fc9b5d3cf78eb656278;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Block.php b/includes/Block.php index 3896369ce4..aaabec9291 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -347,7 +347,7 @@ class Block { /** * Given a database row from the ipblocks table, initialize * member variables - * @param ResultWrapper $row A row from the ipblocks table + * @param stdClass $row A row from the ipblocks table */ protected function initFromRow( $row ) { $this->setTarget( $row->ipb_address ); @@ -382,7 +382,7 @@ class Block { /** * Create a new Block object from a database row - * @param ResultWrapper $row Row from the ipblocks table + * @param stdClass $row Row from the ipblocks table * @return Block */ public static function newFromRow( $row ) { @@ -967,7 +967,7 @@ class Block { $method = __METHOD__; $dbw = wfGetDB( DB_MASTER ); - $dbw->onTransactionIdle( function() use ( $dbw, $method ) { + $dbw->onTransactionIdle( function () use ( $dbw, $method ) { $dbw->delete( 'ipblocks', array( 'ipb_expiry < ' . $dbw->addQuotes( $dbw->timestamp() ) ), $method ); } ); @@ -1123,7 +1123,7 @@ class Block { // Sort hard blocks before soft ones and secondarily sort blocks // that disable account creation before those that don't. - usort( $blocks, function( Block $a, Block $b ) { + usort( $blocks, function ( Block $a, Block $b ) { $aWeight = (int)$a->isHardblock() . (int)$a->prevents( 'createaccount' ); $bWeight = (int)$b->isHardblock() . (int)$b->prevents( 'createaccount' ); return strcmp( $bWeight, $aWeight ); // highest weight first @@ -1368,7 +1368,7 @@ class Block { $this->getId(), $lang->formatExpiry( $this->mExpiry ), (string)$intended, - $lang->timeanddate( wfTimestamp( TS_MW, $this->mTimestamp ), true ), + $lang->userTimeAndDate( $this->mTimestamp, $context->getUser() ), ); } }