Revert "Remove old remapping hacks from Database::indexName()"
[lhc/web/wiklou.git] / maintenance / createCommonPasswordCdb.php
index c678712..f13dd93 100644 (file)
@@ -37,7 +37,7 @@ class GenerateCommonPassword extends Maintenance {
        public function __construct() {
                global $IP;
                parent::__construct();
-               $this->mDescription = "Generate CDB file of common passwords";
+               $this->addDescription( 'Generate CDB file of common passwords' );
                $this->addOption( 'limit', "Max number of passwords to write", false, true, 'l' );
                $this->addArg( 'inputfile', 'List of passwords (one per line) to use or - for stdin', true );
                $this->addArg(
@@ -69,7 +69,7 @@ class GenerateCommonPassword extends Maintenance {
                try {
                        $db = \Cdb\Writer::open( $outfile );
 
-                       $alreadyWritten = array();
+                       $alreadyWritten = [];
                        $skipped = 0;
                        for ( $i = 0; ( $i - $skipped ) < $limit; $i++ ) {
                                if ( feof( $file ) ) {