[Koha-bugs] [Bug 20438] Allow uninstalling plugins not implementing the 'uninstall' method

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Mar 20 14:05:19 CET 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20438

Kyle M Hall <kyle at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #73080|0                           |1
        is obsolete|                            |

--- Comment #3 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 73102
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73102&action=edit
Bug 20438: Allow uninstalling plugins not implementing the 'uninstall' method

The plugins handling code expects plugins implementing an 'uninstall' method
for
cleanup purposes. It executes this method, and then moves on with removing the
configuration entries in the storage, and the plugin itself.

But the 'plugins-home.tt' template makes the tool display the 'Uninstall'
link in the dropdown ONLY when the plugin has the 'uninstall' method.

This patch fixes the issue.

To reproduce:
- Install the KitchenSink plugin [1]
=> SUCCESS: The 'actions' dropdown for KitchenSink shows an 'Uninstall' option
- Edit the code for the plugin:
  $ sudo vim
/var/lib/koha/kohadev/plugins/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm
- Remove the uninstall sub
- Restart everything:
  $ restart_all
- Reload the browser
=> FAIL: There's no 'Uninstall' option in the actions dropdown.
- Apply this patch
- Restart everything
  $ restart_all
- Reload the browser
=> SUCCESS: The 'actions' dropdown for KitchenSink shows an 'Uninstall' option
- Sign off :-D

[1] https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases

Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>

Signed-off-by: Mark Tompsett <mtompset at hotmail.com>

Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list