function update_selection_page in Drupal 4
Same name and namespace in other branches
- 5 update.php \update_selection_page()
- 6 update.php \update_selection_page()
- 7 update.php \update_selection_page()
1 call to update_selection_page()
- update.php in ./
update.php - Administrative page for handling updates from one Drupal version to another.
File
- ./
update.php, line 316 - Administrative page for handling updates from one Drupal version to another.
Code
function update_selection_page() {
$output = '<p>The version of Drupal you are updating from has been automatically detected. You can select a different version, but you should not need to.</p>';
$output .= '<p>Click Update to start the update process.</p>';
$form = array();
$form['start'] = array(
'#tree' => TRUE,
'#type' => 'fieldset',
'#title' => 'Select versions',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
foreach (module_list() as $module) {
$updates = drupal_get_schema_versions($module);
if ($updates !== FALSE) {
$updates = drupal_map_assoc($updates);
$updates[] = 'No updates available';
$form['start'][$module] = array(
'#type' => 'select',
'#title' => $module . ' module',
'#default_value' => array_search(drupal_get_installed_schema_version($module), $updates) + 1,
'#options' => $updates,
);
}
}
$form['has_js'] = array(
'#type' => 'hidden',
'#default_value' => FALSE,
'#attributes' => array(
'id' => 'edit-has_js',
),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => 'Update',
);
drupal_set_title('Drupal database update');
// Prevent browser from using cached drupal.js or update.js
drupal_add_js('misc/update.js', TRUE);
$output .= drupal_get_form('update_script_selection_form', $form);
return $output;
}