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

git-svn-id: https://develop.svn.wordpress.org/trunk@25422 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2013-09-13 06:52:11 +00:00
parent 63956aa479
commit 5959a7011b
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 ) {