// If the owner of the directory we extracted is the same as the owner of
// our configuration directory (e.g. sites/default) where we're trying to
// install the code, there's no need to prompt for FTP/SSH credentials.
// Instead, we instantiate a Drupal\Core\FileTransfer\Local and invoke
// update_authorize_run_install() directly.
if (fileowner($project_real_location) ==
fileowner($this->sitePath
) && !
$test_authorize) { $this->moduleHandler->
loadInclude('update', 'inc', 'update.authorize'
);
$filetransfer =
new Local($this->root, \Drupal::
service('file_system'
));
$response =
call_user_func_array('update_authorize_run_install',
array_merge([$filetransfer],
$arguments));
if ($response instanceof Response
) { $form_state->
setResponse($response);
} } // Otherwise, go through the regular workflow to prompt for FTP/SSH
// credentials and invoke update_authorize_run_install() indirectly with
// whatever FileTransfer object authorize.php creates for us.
else { // The page title must be passed here to ensure it is initially used when
// authorize.php loads for the first time with the FTP/SSH credentials
// form.
system_authorized_init('update_authorize_run_install', __DIR__ . '/../../update.authorize.inc',
$arguments,
$this->
t('Update manager'
));