function upgrade_assist_backup_current in Upgrade Status 6
Form constructor to perform database backup via Demo.
@todo Rename this function; used by more than once step now.
File
- upgrade_assist/
upgrade_assist.module, line 454 - Assists in upgrading Drupal.
Code
function upgrade_assist_backup_current() {
drupal_set_title(t('Backup current site'));
module_load_include('inc', 'demo', 'demo.admin');
$args = func_get_args();
switch (DRUPAL_CORE_COMPATIBILITY) {
case '6.x':
$form = demo_dump_form();
$filename = $args[1];
break;
case '7.x':
$form = demo_dump_form($args[0], $args[1]);
$filename = $args[2];
break;
}
$form['#submit'][] = 'demo_dump_form_submit';
$form['dump']['filename']['#value'] = $filename;
$form['dump']['filename']['#disabled'] = TRUE;
$form['dump']['description']['#default_value'] = t('Before upgrade to Drupal !version.', array(
'!version' => variable_get('upgrade_assist_core', 6) + 1,
));
return $form;
}