diff --git a/modules/performance/php-optimizer.sh b/modules/performance/php-optimizer.sh index d99fd27..dbdc491 100755 --- a/modules/performance/php-optimizer.sh +++ b/modules/performance/php-optimizer.sh @@ -2185,20 +2185,17 @@ restore_configurations() { return fi - # Display backups + # Display backups and store backup names in array for selection local backup_array=() - local index=1 + mapfile -t backup_array < <(echo "$backups" | tail -n +2 | cut -d'|' -f1) + local index=1 echo "$backups" | tail -n +2 | while IFS='|' read -r backup_name created username domain file_count; do printf "${GREEN}%3d${NC}) %-20s %s ${CYAN}[%s]${NC} ${YELLOW}(%s)${NC} %s files\n" \ "$index" "$backup_name" "$created" "$username" "$domain" "$file_count" - backup_array+=("$backup_name") index=$((index + 1)) done - # Store backup names in array for selection - mapfile -t backup_array < <(echo "$backups" | tail -n +2 | cut -d'|' -f1) - echo "" cecho "${CYAN}─────────────────────────────────────────────────────────────────────${NC}"