function redirect_install in Redirect 7
Same name and namespace in other branches
- 7.2 redirect.install \redirect_install()
Implements hook_install().
File
- ./
redirect.install, line 126 - Install, update and uninstall functions for the redirect module.
Code
function redirect_install() {
// If the path redirect table exists then run the migration.
if (db_table_exists('path_redirect')) {
$file = drupal_get_path('module', 'redirect') . '/redirect.install';
$batch = array(
'title' => t('Migrating redirects'),
'operations' => array(
array(
'_redirect_migrate_path_redirect_redirects',
array(),
),
),
'finished' => '_redirect_migrate_finished_callback',
'file' => $file,
);
batch_set($batch);
}
}