| 7 update.authorize.inc | update_authorize_run_install($filetransfer, $project, $updater_name, $local_url) |
| 8 update.authorize.inc | update_authorize_run_install($filetransfer, $project, $updater_name, $local_url) |
Callback invoked by authorize.php to install a new project.
Parameters
FileTransfer $filetransfer: The FileTransfer object created by authorize.php for use during this operation.
string $project: The canonical project short name (e.g. {system}.name).
string $updater_name: The name of the Updater class to use for installing this project.
string $local_url: The URL to the locally installed temp directory where the project has already been downloaded and extracted into.
1 string reference to 'update_authorize_run_install'
File
- modules/
update/ update.authorize.inc, line 66 - Callbacks and related functions invoked by authorize.php to update projects on the Drupal site. We use the Batch API to actually update each individual project on the site. All of the code in this file is run at a low bootstrap level (modules are not…
Code
function update_authorize_run_install($filetransfer, $project, $updater_name, $local_url) {
$operations[] = array(
'update_authorize_batch_copy_project',
array(
$project,
$updater_name,
$local_url,
$filetransfer,
),
);
// @todo Instantiate our Updater to set the human-readable title?
$batch = array(
'title' => t('Installing %project', array('%project' => $project)),
'init_message' => t('Preparing to install'),
'operations' => $operations,
// @todo Use a different finished callback for different messages?
'finished' => 'update_authorize_install_batch_finished',
'file' => drupal_get_path('module', 'update') . '/update.authorize.inc',
);
batch_set($batch);
// Invoke the batch via authorize.php.
system_authorized_batch_process();
}
Login or register to post comments