}
public function execute() {
- global $wgAuth;
-
- if ( !$wgAuth->allowSetLocalPassword() ) {
- $this->error( '$wgAuth does not allow local passwords. Aborting.', true );
- }
-
$passwordFactory = new PasswordFactory();
$passwordFactory->init( RequestContext::getMain()->getConfig() );
// Check that type exists and is a layered type
if ( !isset( $typeInfo[$layeredType] ) ) {
- $this->error( 'Undefined password type', true );
+ $this->fatalError( 'Undefined password type' );
}
$passObj = $passwordFactory->newFromType( $layeredType );
if ( !$passObj instanceof LayeredParameterizedPassword ) {
- $this->error( 'Layered parameterized password type must be used.', true );
+ $this->fatalError( 'Layered parameterized password type must be used.' );
}
// Extract the first layer type
__METHOD__,
[
'ORDER BY' => 'user_id',
- 'LIMIT' => $this->mBatchSize,
+ 'LIMIT' => $this->getBatchSize(),
'LOCK IN SHARE MODE',
]
);
}
}
-$maintClass = "WrapOldPasswords";
+$maintClass = WrapOldPasswords::class;
require_once RUN_MAINTENANCE_IF_MAIN;