Issue #3305094: Log "backup restored" to watchdog after restore finished
2 unresolved threads
Merge request reports
Activity
72 72 // Run the backup. 73 73 $bam->restore($source_id, $destination_id, $file_id); 74 74 \Drupal::messenger()->addMessage(t('Restore completed at @time', ['@time' => $currentTime])); 75 76 $source = $bam->sources()->get($source_id); 77 $source_name = ''; 78 if($source){ 79 $source_name = ' into '.$source->config()->get('name'); I am not sure we should wrap it into t() as $message param in \Drupal::logger is going to be translated already so we don't want to translate it twice? However I will refactor this and move both strings to line 88 as part of logger message. Theoretically $source and $destination shouldn't be empty but its better to have failsafe since I couldn't check all the source and destination plugins out there.
changed this line in version 3 of the diff
Yep, I agree with @tamerzg!
72 72 // Run the backup. 73 73 $bam->restore($source_id, $destination_id, $file_id); 74 74 \Drupal::messenger()->addMessage(t('Restore completed at @time', ['@time' => $currentTime])); 75 76 $source = $bam->sources()->get($source_id); 77 $source_name = ''; 78 if($source){ 79 $source_name = ' into '.$source->config()->get('name'); 80 } 81 82 $destination = $bam->destinations()->get($destination_id); 83 $destination_name = ''; 84 if($destination){ 85 $destination_name = ' from '.$destination->config()->get('name'); changed this line in version 3 of the diff
added 2 commits
added 7 commits
Toggle commit list
Please register or sign in to reply