Bugzilla – Attachment 73056 Details for
Bug 20438
Allow uninstalling plugins not implementing the 'uninstall' method
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20438: Allow uninstalling plugins not implementing the 'uninstall' method
Bug-20438-Allow-uninstalling-plugins-not-implement.patch (text/plain), 2.56 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-03-16 18:21:47 UTC
(
hide
)
Description:
Bug 20438: Allow uninstalling plugins not implementing the 'uninstall' method
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-03-16 18:21:47 UTC
Size:
2.56 KB
patch
obsolete
>From c4fbeb79ca645ecbbe27e9aa4843a7c6397a1ca0 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 16 Mar 2018 15:18:15 -0300 >Subject: [PATCH] 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@theke.io> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt | 2 -- > 1 file changed, 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt >index a2c91d4cbd..4f895f4c77 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt >@@ -113,9 +113,7 @@ > [% END %] > [% END %] > [% IF ( CAN_user_plugins_manage ) %] >- [% IF plugin.can('uninstall') %] > <li><a class="uninstall_plugin" data-plugin-name="[% plugin.metadata.name %]" href="/cgi-bin/koha/plugins/plugins-uninstall.pl?class=[% plugin.class %]"><i class="fa fa-trash"></i> Uninstall</a></li> >- [% END %] > [% END %] > </ul> > </div> >-- >2.16.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20438
:
73056
|
73080
|
73102