Mod. Backups. Refactoring procedural functions into class methods#626
Open
AntonV1211 wants to merge 13 commits into
Open
Mod. Backups. Refactoring procedural functions into class methods#626AntonV1211 wants to merge 13 commits into
AntonV1211 wants to merge 13 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the legacy procedural backups/rollback logic (inc/spbc-backups.php) into BackupsActions class methods and updates the scanner/admin/remote-call integration points to use the new class-based API.
Changes:
- Moved backup creation, deletion, rollback, and helper functions from
inc/spbc-backups.phpintolib/.../ScannerActions/BackupsActions.php. - Updated scanner stages/queue, cure log, admin AJAX hooks, and remote call rollback to use
BackupsActionsmethods. - Removed the
inc/spbc-backups.phpbootstrap include and added a unit test fordeleteBackupAjax().
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/CleantalkSP/SpbctWP/Scanner/ScannerActions/BackupsActions.php | Adds a unit test for the new AJAX delete handler. |
| security-malware-firewall.php | Removes the legacy inc/spbc-backups.php require. |
| lib/CleantalkSP/SpbctWP/Scanner/Stages/CureStage.php | Switches backup creation and “has backup” checks to BackupsActions. |
| lib/CleantalkSP/SpbctWP/Scanner/ScannerQueue.php | Switches auto-cure backup creation to BackupsActions. |
| lib/CleantalkSP/SpbctWP/Scanner/ScannerActions/BackupsActions.php | Implements the refactored backups/rollback logic and AJAX handlers. |
| lib/CleantalkSP/SpbctWP/Scanner/CureLog/CureLog.php | Switches “has backup” checks and backup cleanup to BackupsActions. |
| lib/CleantalkSP/SpbctWP/RemoteCalls.php | Routes rollback remote-call action through BackupsActions. |
| inc/spbc-settings.php | Updates list table func_data_total to use BackupsActions::countBackups. |
| inc/spbc-backups.php | Removes the old procedural backups implementation. |
| inc/spbc-admin.php | Updates AJAX action handlers to call BackupsActions methods. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1903a09 to
8bbdd93
Compare
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.
https://app.doboard.com/1/task/30001