$test_authorize = FALSE;
if (drupal_valid_test_ua()) { $test_authorize = \Drupal::
state()->
get('test_uploaders_via_prompt', FALSE
);
} // 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