/**
* 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 );
/**
* 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 ) {
$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 );
} );
// 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
$this->getId(),
$lang->formatExpiry( $this->mExpiry ),
(string)$intended,
- $lang->timeanddate( wfTimestamp( TS_MW, $this->mTimestamp ), true ),
+ $lang->userTimeAndDate( $this->mTimestamp, $context->getUser() ),
);
}
}