Show backup dates in WordPress cleanup report - #24
Merged
Conversation
- Backups found table now includes each domain's newest and oldest backup date (both console and HTML email), or "-" when a domain has no backups - Removed-file entries now show the file's date next to its name - Fixed a set -u crash in scan_domains when a domain directory has zero backup files (negative array index on an empty array) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
each domain's newest and oldest backup date, so you can see backup
freshness at a glance instead of just a count.
filename, e.g.
backup-4.tar.gz (2025-07-20).Bug fix included
Found and fixed a
set -ucrash inscan_domains(): a domain with zerobackup files hit a negative array index (
dates[-1]) on an empty array,which errors under
set -urather than returning empty. Now explicitlyguarded.
Testing
shellcheckclean (pre-existing intentional-glob info only)and a domain with zero backups (regression test for the crash above)