Merge "Use StaticArrayWriter class"

This commit is contained in:
jenkins-bot 2018-08-18 06:25:12 +00:00 committed by Gerrit Code Review
commit 54bf84c3f1

View file

@ -19,6 +19,7 @@
namespace MediaWiki\SecureLinkFixer;
use Maintenance;
use Wikimedia\StaticArrayWriter;
$IP = getenv( 'MW_INSTALL_PATH' );
if ( $IP === false ) {
@ -71,7 +72,8 @@ HEADER;
$data[$exploded[0]] = (int)$exploded[1];
}
}
$code = wfMakeStaticArrayFile( $data, $header );
$writer = new StaticArrayWriter();
$code = $writer->create( $data, $header );
file_put_contents( __DIR__ . '/../domains.php', $code );
$this->output( "Updated domains.php\n" );
}