function backup_migrate_ui_destination_restore_file_confirm

cis7 destinations.inc backup_migrate_ui_destination_restore_file_confirm($form, &$form_state, $destination_id, $file_id)
cle7 destinations.inc backup_migrate_ui_destination_restore_file_confirm($form, &$form_state, $destination_id, $file_id)
elmsmedia7 destinations.inc backup_migrate_ui_destination_restore_file_confirm($form, &$form_state, $destination_id, $file_id)
icor7 destinations.inc backup_migrate_ui_destination_restore_file_confirm($form, &$form_state, $destination_id, $file_id)
meedjum_blog7 destinations.inc backup_migrate_ui_destination_restore_file_confirm($form, &$form_state, $destination_id, $file_id)
mooc7 destinations.inc backup_migrate_ui_destination_restore_file_confirm($form, &$form_state, $destination_id, $file_id)

Ask confirmation for file restore.

1 string reference to 'backup_migrate_ui_destination_restore_file_confirm'
backup_migrate_ui_destination_restore_file in sites/all/modules/ulmus/backup_migrate/includes/destinations.inc
Restore a backup file from a destination.

File

sites/all/modules/ulmus/backup_migrate/includes/destinations.inc, line 376
All of the destination handling code needed for Backup and Migrate.

Code

function backup_migrate_ui_destination_restore_file_confirm($form, &$form_state, $destination_id, $file_id) {
  $sources = _backup_migrate_get_destination_form_item_options('source');
  if (count($sources) > 1) {
    $form['source_id'] = array(
      "#type" => "select",
      "#title" => t("Database"),
      "#options" => _backup_migrate_get_destination_form_item_options('source'),
      "#description" => t("Choose the database to restore to. Any database destinations you have created and any databases specified in your settings.php can be restored to."),
      "#default_value" => 'db',
    );
  }
  else {
    $form['source_id'] = array(
      "#type" => "value",
      "#value" => 'db',
    );
  }

  $form['destination_id'] = array(
    '#type' => 'value',
    '#value' => $destination_id,
  );
  $form['file_id'] = array(
    '#type' => 'value',
    '#value' => $file_id,
  );
  $form = confirm_form($form, t('Are you sure you want to restore the database?'), BACKUP_MIGRATE_MENU_PATH . "/destination/list/files/" . $destination_id, t('Are you sure you want to restore the database from the backup file %file_id? This will delete some or all of your data and cannot be undone. <strong>Always test your backups on a non-production server!</strong>', array('%file_id' => $file_id)), t('Restore'), t('Cancel'));
  drupal_set_message(t('Restoring will delete some or all of your data and cannot be undone. <strong>Always test your backups on a non-production server!</strong>'), 'warning', FALSE);
  $form = array_merge_recursive($form, backup_migrate_filters_settings_form(backup_migrate_filters_settings_default('restore'), 'restore'));
  $form['actions']['#weight'] = 100;

  // Add the advanced fieldset if there are any fields in it.
  if (@$form['advanced']) {
    $form['advanced']['#type'] = 'fieldset';
    $form['advanced']['#title'] = t('Advanced Options');
    $form['advanced']['#collapsed'] = true;
    $form['advanced']['#collapsible'] = true;
  }

  return $form;
}