} // If the owner of the last 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_update() directly.
if (fileowner($project_real_location) ==
fileowner($this->sitePath
)) { $this->moduleHandler->
loadInclude('update', 'inc', 'update.authorize'
);
$filetransfer =
new Local($this->root, \Drupal::
service('file_system'
));
$response =
update_authorize_run_update($filetransfer,
$updates);
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_update() 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.