Skip to content

Smart Table Reset & Navigation Bug Fixes (v2.24)#37

Merged
w3spi5 merged 2 commits intomainfrom
fix/smart-table-reset-bug-fixes
Jan 6, 2026
Merged

Smart Table Reset & Navigation Bug Fixes (v2.24)#37
w3spi5 merged 2 commits intomainfrom
fix/smart-table-reset-bug-fixes

Conversation

@w3spi5
Copy link
Owner

@w3spi5 w3spi5 commented Jan 6, 2026

Summary

This PR introduces Smart Table Reset to automatically handle "Table already exists" errors, fixes critical navigation bugs, and improves header styling.

Changes

✨ New Features

  • Smart Table Reset: Automatically DROP tables before import
    • Pre-scans SQL files for CREATE TABLE statements (.sql, .gz, .bz2)
    • Prevents "Table already exists" errors on re-imports
    • Secure table name validation with regex + backtick quoting
    • Graceful degradation: import continues if reset fails

🐛 Bug Fixes

  • Session cleanup after SSE error: Fixed stale session data causing silent failures on retry
  • Navigation links: Fixed broken "Back to Home" links in various installation paths
    • error.php: ../$scriptUri
    • import.php: /$scriptUri (was going to server root!)
    • layout.php / layout_phar.php: ./$scriptUri

🎨 UI Improvements

  • Header gradients: Theme-aware pastel gradients for light/dark modes

Test Plan

  • SmartTableResetTest.php - 7 tests (table extraction, gzip, deduplication, security)
  • Manual test: re-import same file without manual DROP
  • Manual test: navigation from subdirectory installation

@w3spi5 w3spi5 merged commit a04df6b into main Jan 6, 2026
1 check passed
@w3spi5 w3spi5 deleted the fix/smart-table-reset-bug-fixes branch January 6, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments