| 7 update.authorize.inc | update_authorize_run_update($filetransfer, $projects) |
| 8 update.authorize.inc | update_authorize_run_update($filetransfer, $projects) |
Callback invoked by authorize.php to update existing projects.
Parameters
$filetransfer: The FileTransfer object created by authorize.php for use during this operation.
$projects: A nested array of projects to install into the live webroot, keyed by project name. Each subarray contains the following keys:
- 'project': The canonical project short name.
- 'updater_name': The name of the Updater class to use for this project.
- 'local_url': The locally installed location of new code to update with.
1 call to update_authorize_run_update()
1 string reference to 'update_authorize_run_update'
File
- modules/
update/ update.authorize.inc, line 25 - 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_update($filetransfer, $projects) {
$operations = array();
foreach ($projects as $project => $project_info) {
$operations[] = array(
'update_authorize_batch_copy_project',
array(
$project_info['project'],
$project_info['updater_name'],
$project_info['local_url'],
$filetransfer,
),
);
}
$batch = array(
'title' => t('Installing updates'),
'init_message' => t('Preparing to update your site'),
'operations' => $operations,
'finished' => 'update_authorize_update_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