diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php index b240ee26f..32a62b6b4 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -54,7 +54,7 @@ class WP_Upgrader { function fs_connect( $directories = array() ) { global $wp_filesystem; - if ( false === ($credentials = $this->skin->request_filesystem_credentials()) ) //request_filesystem_credentials($url)) ) + if ( false === ($credentials = $this->skin->request_filesystem_credentials()) ) return false; if ( ! WP_Filesystem($credentials) ) { @@ -258,9 +258,6 @@ class WP_Upgrader { $options = wp_parse_args($options, $defaults); extract($options); - $this->skin->header(); - $this->skin->before(); - //Connect to the Filesystem first. $res = $this->fs_connect( array(WP_CONTENT_DIR, $destination) ); if ( ! $res ) //Mainly for non-connected filesystem. @@ -270,7 +267,10 @@ class WP_Upgrader { $this->skin->error($res); return $res; } - + + $this->skin->header(); + $this->skin->before(); + //Download the package (Note, This just returns the filename of the file if the package is a local file) $download = $this->download_package( $package ); if ( is_wp_error($download) ) { diff --git a/wp-admin/update.php b/wp-admin/update.php index 44bdb5a4b..b7aa67a0b 100644 --- a/wp-admin/update.php +++ b/wp-admin/update.php @@ -77,11 +77,7 @@ if ( isset($_GET['action']) ) { $title = sprintf( __('Installing Plugin: %s'), $api->name . ' ' . $api->version ); $nonce = 'install-plugin_' . $plugin; - $url = add_query_arg( array( - 'plugin' => $plugin, - 'plugin_name' => $api->name . ' ' . $api->version, - 'download_url' => $api->download_link - ), 'update.php?action=install-plugin'); + $url = 'update.php?action=install-plugin&plugin=' . $plugin; $type = 'web'; //Install plugin type, From Web or an Upload. $upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) ); @@ -157,11 +153,7 @@ if ( isset($_GET['action']) ) { $title = sprintf( __('Installing theme: %s'), $api->name . ' ' . $api->version ); $nonce = 'install-theme_' . $theme; - $url = add_query_arg( array( - 'theme' => $theme, - 'theme_name' => $api->name . ' ' . $api->version, - 'download_url' => $api->download_link - ), 'update.php?action=install-theme'); + $url = 'update.php?action=install-theme&theme=' . $theme; $type = 'web'; //Install theme type, From Web or an Upload. $upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) );