When recreating joomla staging by replacing the joomla staging files, if there are applied patchs before they stay in the database, although the patch tester component has removed (because it's not in joomla staging files). This works as for any other extension.
When installing the patchtester in the new recreated joomla staging again we cannot unapply those patchs.
That i know of, we only have two options:
In a normal extension this is obviously not a problem, but the patch tester is for test envirments that are constantly recreted (sometimes several times a day).
So is there a way to the patchtester recognize there is really no pull applied (ex: the txt file is not in the backups directory) and remove it from the #_patchtester_tests table?
couldn't we do it like a "Reset" button that removes all patches (if applied), deletes the txt in the backups dir and truncate the tables?
If you've reinstalled the CMS you've also presumably had to reinstall the component, and at that point we can't rely on anything in the database to track applied states (as the tests table is where we're storing the array with all the patch's changed files and the files in the backup folder are md5 hashed so nothing there can identify what might have been applied).
A reset button could cleanly revert stuff if we have the data, but if the database table is empty and we have stuff in the backups folder, at best we just clean the backups and hope the user is in the expected state.
so, all we need is: if no data in database table clean backups folder.
Yep. I'd make the button smart (make it pop an alert saying what it'll do) and make the task smart enough to be able to revert everything if we have data in the database as well as just purge the backups folder if there is no data.
| Status | New | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-03-26 22:08:08 |
| Closed_By | ⇒ | mbabker |
The backup files are named with an md5 hash, and actually through this loop the same code that makes applying patches after a reinstall like this not possible is what also blocks installing multiple patches against the same file (since this isn't truly patching files). This might just need another view to check the state of everything and give someone the ability to do a hard reset (nuke whatever's in the backups directory and truncate the tests table).