Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
I'm currently working on ReportIt 0.7.0 and implemented the features of PIA 2.x last weekend. During a test of "plugin_reportit_uninstall" I realised that all data will be removed directly. Mmmhhh ... that's a little bit too fast.
So, how do you think about a confirmation box to avoid that?
I modified your function "update_show_current()" to test it with some lines of Java Script.
?>
<script type="text/javascript">
<!--
function confirmation(plugin) {
var answer = confirm("Do you really want to uninstall " + plugin.toUpperCase() + " ?\nPlease note that individual settings, results and configurations of that plugin will get lost." )
if (answer){
window.location = "plugins.php?mode=uninstall&id=" + plugin;
}
}
//-->
</script>
<?php
This is why I added only an empty function for _uninstall() too... far too easy to just remove all your data. I would cry for quite some time if I did that with thold.
Also, when the _check() is implemented, that should be able to return a message to the user about why the check failed.
Ya, I will definitely add that. I am currently working on several new functions too that are needed for upgrades, updating / adding hooks, adding indexes, updating realm filenames, etc... I am also looking into an automatic version tracking, and a few things I noticed when writing a major upgrade for thold.
Lots and lots of work still needed. Keep the ideas coming so I can see the issues that everyone else is running into.
BTW, even with the uninstall hook blank, it will still wipe out all the data, as long as it used the plugin function to install the tables. It logs the tables and columns it added, so it knows what to remove when the time comes. The uninstall function is just incase there is anything extra, like temp files, that you want to remove.
cigamit wrote:BTW, even with the uninstall hook blank, it will still wipe out all the data, as long as it used the plugin function to install the tables. It logs the tables and columns it added, so it knows what to remove when the time comes. The uninstall function is just incase there is anything extra, like temp files, that you want to remove.
I think ALOT of documentation is in order also.
You can say that again. I didn't know there even was an api function to create tables.
I've accidentally uninstalled plugins a number of times recently, and *especially* since the blocks in the Plugin Management move around depending on whether plugins are enabled (thought you uninstalled the plugin you just disabled? nope, sorry). That makes having it also automatically delete all my data without warning seem like a bad idea. Perhaps at least the option to dump the tables to a file before dropping them would be useful...