Well, i was curious if it would work and i had the evening, so i started today.
The attached plugin will hook into the dashboard-plugin, add an "update now!"-button if the dashboard-plugin detects an available update, download it and copy the files over the old ones.
However, it does not:
* make a backup
* start the update-process itself, which begins when visiting a page afterwards
* check for the necessary rights
* work if the dashboard-plugin isn't modified
The necessary modification to the dashboard-plugin is an added event-hook:
Code: Select all
--- serendipity_event_dashboard/serendipity_event_dashboard.php 2010-08-13 00:37:10.000000000 +0200
+++ /var/www/plugins/serendipity_event_dashboard/serendipity_event_dashboard.php 2011-01-13 20:30:29.151714772 +0100
@@ -464,8 +464,11 @@
$nv = $this->get_config('last_version');
+ $addData = '';
+ serendipity_plugin_api::hook_event('plugin_dashboard_updater', $nv, &$addData);
- print $this->get_config('update_text');
+ $update_text = $this->get_config('update_text');
+ print $update_text . $addData;
I now am convinced we could go that way. Even though the plugin at first failed to unpack all the files on my testinstallation because of insufficent rights (only the prior modified dirs plugins/ and templates_c/ worked), nothing got broken. With some polish on showing the progress, a hint to backup everything, maybe an automatic backup of the filesystem and a prior shown hint how the filepermissions should look like (like in the installation) this could already be it.
Have fun testing ;)