} // end copying to local. // Handle download link if (pb_backupbuddy::_GET('downloadlink_file') != '') { $link = pb_backupbuddy_destination_s32::getFileURL($settings, pb_backupbuddy::_GET('downloadlink_file')); pb_backupbuddy::alert('You may download this backup (' . pb_backupbuddy::_GET('downloadlink_file') . ') with <a href="' . $link . '">this link</a>. The link is valid for one hour.'); echo '<br>'; } // end download link. // Get list of files for this site. if ('true' != pb_backupbuddy::_GET('listAll')) { $remotePath = $settings['directory'] . 'backup-' . backupbuddy_core::backup_prefix(); } else { $remotePath = $settings['directory']; } $files = pb_backupbuddy_destination_s32::listFiles($settings, $remotePath); if (!is_array($files)) { die('Error listing files: `' . $files . '`.'); } $backup_list_temp = array(); foreach ($files as $object) { $file = str_ireplace($settings['directory'], '', $object['Key']); if (FALSE !== stristr($file, '/')) { // Do NOT display any files within a deeper subdirectory. continue; } if (!preg_match(pb_backupbuddy_destination_s32::BACKUP_FILENAME_PATTERN, $file) && 'importbuddy.php' !== $file) { // Do not display any files that do not appear to be a BackupBuddy backup file (except importbuddy.php). continue; } $last_modified = strtotime($object['LastModified']);