Commit 26435189 authored by Alex Andrascu's avatar Alex Andrascu

Issue #2913362 by fietserwin: The destination upload does not exist

Restored the upload destination on the service object. Removed the upload destination from the Quick backup form instead.
parent c2ac9274
......@@ -133,6 +133,8 @@ function backup_migrate_backup_migrate_service_object_alter(BackupMigrateInterfa
$user = \Drupal::currentUser();
if ($user->hasPermission('Access backup files'))
$destinations->add('download', new \BackupMigrate\Drupal\Destination\DrupalBrowserDownloadDestination(new Config(['name' => t('Download')])));
// Add an upload destination.
$destinations->add('upload', new \BackupMigrate\Drupal\Destination\DrupalBrowserUploadDestination(new Config(['name' => t('Upload')])));
}
// Add a file naming filter.
......
......@@ -41,7 +41,7 @@ class BackupMigrateQuickBackupForm extends FormBase {
$form['quickbackup']['source_id'] = DrupalConfigHelper::getSourceSelector($bam, t('Backup Source'));
$form['quickbackup']['destination_id'] = DrupalConfigHelper::getDestinationSelector($bam, t('Backup Destination'));
$form['quickbackup']['settings_profile_id'] = DrupalConfigHelper::getSettingsProfileSelector(t('Settings Profile'));
unset ($form['quickbackup']['destination_id']['#options']['upload']);
// Create the service
// $bam = backup_migrate_get_service_object();
// $bam->setConfig($config);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment