Skip to content

Commit

Permalink
upgrade to 1.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
notslang committed Jun 25, 2014
1 parent b6b66ef commit 0ceabb1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
25 changes: 18 additions & 7 deletions class/wpmdbpro-media-files.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function __construct( $plugin_file_path ) {
$this->plugin_slug = 'wp-migrate-db-pro-media-files';
$this->plugin_version = $GLOBALS['wpmdb_meta']['wp-migrate-db-pro-media-files']['version'];

if( ! $this->meets_version_requirements( '1.4b1' ) ) return;
if( ! $this->meets_version_requirements( '1.4' ) ) return;

add_action( 'wpmdb_after_advanced_options', array( $this, 'migration_form_controls' ) );
add_action( 'wpmdb_load_assets', array( $this, 'load_assets' ) );
Expand Down Expand Up @@ -557,14 +557,25 @@ function get_blogs() {

function download_url( $url, $timeout = 300 ) {
//WARNING: The file is not automatically deleted, The script must unlink() the file.
if ( ! $url )
return new WP_Error('http_no_url', __('Invalid URL Provided.'));
if ( ! $url ) {
return new WP_Error( 'http_no_url', __( 'Invalid URL Provided.' ) );
}

$tmpfname = wp_tempnam( $url );
if ( ! $tmpfname ) {
return new WP_Error( 'http_no_file', __( 'Could not create Temporary file.' ) );
}

$tmpfname = wp_tempnam($url);
if ( ! $tmpfname )
return new WP_Error('http_no_file', __('Could not create Temporary file.'));
$sslverify = ( 1 == $this->settings['verify_ssl'] ) ? true : false;
$args = array(
'timeout' => $timeout,
'stream' => true,
'filename' => $tmpfname,
'reject_unsafe_urls' => false,
'sslverify' => $sslverify,
);

$response = wp_remote_get( $url, array( 'timeout' => $timeout, 'stream' => true, 'filename' => $tmpfname, 'reject_unsafe_urls' => false ) );
$response = wp_remote_get( $url, $args );

if ( is_wp_error( $response ) ) {
unlink( $tmpfname );
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?php
$GLOBALS['wpmdb_meta']['wp-migrate-db-pro-media-files']['version'] = '1.1.4b1';
$GLOBALS['wpmdb_meta']['wp-migrate-db-pro-media-files']['version'] = '1.1.4';
2 changes: 1 addition & 1 deletion wp-migrate-db-pro-media-files.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin URI: http://deliciousbrains.com/wp-migrate-db-pro/
Description: An extension to WP Migrate DB Pro, allows the migration of media files.
Author: Delicious Brains
Version: 1.1.4b1
Version: 1.1.4
Author URI: http://deliciousbrains.com
Network: True
*/
Expand Down

0 comments on commit 0ceabb1

Please sign in to comment.