From 1a14b66fef5cb9f3f584b77199a68376cbbcbd09 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Fri, 17 Aug 2018 22:35:05 -0700 Subject: [PATCH] Use StaticArrayWriter class Bug: T200626 Depends-On: I022c074e8a708fb5219bc4ff4b53e7e31f60dc4b Change-Id: Iada6cd6f3d9a1c87613d2603ceb0d499bfb6c8f1 --- maintenance/fetchList.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/maintenance/fetchList.php b/maintenance/fetchList.php index 4267931..fa86a7a 100644 --- a/maintenance/fetchList.php +++ b/maintenance/fetchList.php @@ -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" ); }