WordPress Core Automatic Updates: Pass the Filesystem path as $context to request_filesystem_credentials(). See #22704

Built from https://develop.svn.wordpress.org/trunk@25422


git-svn-id: http://core.svn.wordpress.org/trunk@25347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2013-09-13 06:53:09 +00:00
parent 4678d33216
commit 89682d2013
2 changed files with 4 additions and 2 deletions

View File

@ -541,7 +541,9 @@ class Theme_Upgrader_Skin extends WP_Upgrader_Skin {
class Automatic_Upgrader_Skin extends WP_Upgrader_Skin {
var $messages = array();
function request_filesystem_credentials( $error = false ) {
function request_filesystem_credentials( $error = false, $context = '' ) {
if ( $context )
$this->options['context'] = $context;
// TODO: fix up request_filesystem_credentials(), or split it, to allow us to request a no-output version
// This will output a credentials form in event of failure, We don't want that, so just hide with a buffer
ob_start();

View File

@ -1352,7 +1352,7 @@ class WP_Automatic_Upgrader {
static function can_auto_update( $context ) {
if ( ! self::$skin )
self::$skin = new Automatic_Upgrader_Skin();
return (bool) self::$skin->request_filesystem_credentials();
return (bool) self::$skin->request_filesystem_credentials( false, $context );
}
static function upgrade( $type, $item ) {