Skip to content

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

Merged
keyamasabaya merged 2 commits into
mainfrom
fix/smart-table-reset-bug-fixes
Jan 6, 2026
Merged

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

Conversation

@keyamasabaya

Copy link
Copy Markdown
Owner

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

@keyamasabaya
keyamasabaya merged commit a04df6b into main Jan 6, 2026
1 check passed
@keyamasabaya
keyamasabaya 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