From: scribu Date: Thu, 11 Jul 2013 22:19:38 +0000 (+0300) Subject: rename _download() to _read() to make it clearer that it doesn't deal with binary... X-Git-Tag: v0.11.0~37 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=bbf481ad77886b24ebcc6f77ee8c6989172eb657;p=wvm%2Fwvm.git rename _download() to _read() to make it clearer that it doesn't deal with binary data --- diff --git a/php/commands/core.php b/php/commands/core.php index 59964c08..42419f64 100644 --- a/php/commands/core.php +++ b/php/commands/core.php @@ -46,14 +46,14 @@ class Core_Command extends WP_CLI_Command { WP_CLI::success( 'WordPress downloaded.' ); } - private static function _download( $url ) { + private static function _read( $url ) { exec( 'curl -s ' . escapeshellarg( $url ), $lines, $r ); if ( $r ) exit( $r ); return implode( "\n", $lines ); } private function get_download_offer( $locale ) { - $out = unserialize( self::_download( + $out = unserialize( self::_read( 'https://api.wordpress.org/core/version-check/1.6/?locale=' . $locale ) ); return $out['offers'][0]; @@ -101,7 +101,7 @@ class Core_Command extends WP_CLI_Command { } // TODO: adapt more resilient code from wp-admin/setup-config.php - $assoc_args['keys-and-salts'] = self::_download( + $assoc_args['keys-and-salts'] = self::_read( 'https://api.wordpress.org/secret-key/1.1/salt/' ); $out = Utils\mustache_render( 'wp-config.mustache', $assoc_args );