mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SecureLinkFixer
synced 2024-11-24 23:45:37 +00:00
Merge "Use StaticArrayWriter class"
This commit is contained in:
commit
54bf84c3f1
|
@ -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" );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue