On this page
function update_authorize_run_install
update_authorize_run_install($filetransfer, $project, $updater_name, $local_url)
Installs a new project when invoked by authorize.php.
Callback for system_authorized_init() in update_manager_install_form_submit().
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.
File
- modules/update/update.authorize.inc, line 73
- Callbacks and related functions invoked by authorize.php to update projects.
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();
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!update!update.authorize.inc/function/update_authorize_run_install/7.x