Ticket #7875: 7875.7.diff
File 7875.7.diff, 2.6 KB (added by , 15 years ago) |
---|
-
wp-admin/includes/class-wp-upgrader.php
54 54 function fs_connect( $directories = array() ) { 55 55 global $wp_filesystem; 56 56 57 if ( false === ($credentials = $this->skin->request_filesystem_credentials()) ) //request_filesystem_credentials($url)) )57 if ( false === ($credentials = $this->skin->request_filesystem_credentials()) ) 58 58 return false; 59 59 60 60 if ( ! WP_Filesystem($credentials) ) { … … 258 258 $options = wp_parse_args($options, $defaults); 259 259 extract($options); 260 260 261 $this->skin->header();262 $this->skin->before();263 264 261 //Connect to the Filesystem first. 265 262 $res = $this->fs_connect( array(WP_CONTENT_DIR, $destination) ); 266 263 if ( ! $res ) //Mainly for non-connected filesystem. … … 270 267 $this->skin->error($res); 271 268 return $res; 272 269 } 273 270 271 $this->skin->header(); 272 $this->skin->before(); 273 274 274 //Download the package (Note, This just returns the filename of the file if the package is a local file) 275 275 $download = $this->download_package( $package ); 276 276 if ( is_wp_error($download) ) { -
wp-admin/update.php
77 77 78 78 $title = sprintf( __('Installing Plugin: %s'), $api->name . ' ' . $api->version ); 79 79 $nonce = 'install-plugin_' . $plugin; 80 $url = add_query_arg( array( 81 'plugin' => $plugin, 82 'plugin_name' => $api->name . ' ' . $api->version, 83 'download_url' => $api->download_link 84 ), 'update.php?action=install-plugin'); 80 $url = 'update.php?action=install-plugin&plugin=' . $plugin; 85 81 $type = 'web'; //Install plugin type, From Web or an Upload. 86 82 87 83 $upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) ); … … 157 153 158 154 $title = sprintf( __('Installing theme: %s'), $api->name . ' ' . $api->version ); 159 155 $nonce = 'install-theme_' . $theme; 160 $url = add_query_arg( array( 161 'theme' => $theme, 162 'theme_name' => $api->name . ' ' . $api->version, 163 'download_url' => $api->download_link 164 ), 'update.php?action=install-theme'); 156 $url = 'update.php?action=install-theme&theme=' . $theme; 165 157 $type = 'web'; //Install theme type, From Web or an Upload. 166 158 167 159 $upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) );