Test writability of ABSPATH when upgrading core or WP_PLUGIN_DIR when installing/updating themes and plugins, fixes #9936

git-svn-id: https://develop.svn.wordpress.org/trunk@11499 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2009-05-31 21:08:03 +00:00
parent f1b8716b93
commit 85df37ac27
3 changed files with 17 additions and 12 deletions
+3 -2
View File
@@ -720,7 +720,7 @@ class WP_Upgrader_Skin {
return $this->__construct($args);
}
function __construct($args = array()) {
$defaults = array( 'url' => '', 'nonce' => '', 'title' => '' );
$defaults = array( 'url' => '', 'nonce' => '', 'title' => '', 'context' => false );
$this->options = wp_parse_args($args, $defaults);
}
@@ -734,9 +734,10 @@ class WP_Upgrader_Skin {
function request_filesystem_credentials($error = false) {
$url = $this->options['url'];
$context = $this->options['context'];
if ( !empty($this->options['nonce']) )
$url = wp_nonce_url($url, $this->options['nonce']);
return request_filesystem_credentials($url, '', $error); //Possible to bring inline, Leaving as0is for now.
return request_filesystem_credentials($url, '', $error, $context); //Possible to bring inline, Leaving as is for now.
}
function header() {