Merge lp:~tblue/quam-plures/plugins_multiple_instances into lp:quam-plures
Status: | Merged |
---|---|
Merged at revision: | 7628 |
Proposed branch: | lp:~tblue/quam-plures/plugins_multiple_instances |
Merge into: | lp:quam-plures |
Diff against target: |
201 lines (+61/-16) 4 files modified
qp_inc/plugins/model/_plugins.class.php (+9/-2) qp_inc/plugins/model/_plugins_admin.class.php (+49/-9) qp_inc/plugins/plugins.ctrl.php (+0/-2) qp_inc/plugins/views/_plugin_list_available.view.php (+3/-3) |
To merge this branch: | bzr merge lp:~tblue/quam-plures/plugins_multiple_instances |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
EdB | Approve | ||
Tilman Blumenbach (community) | Needs Resubmitting | ||
Review via email: mp+73663@code.launchpad.net |
Description of the change
This is an alternate version of lp:~edb/quam-plures/plugins_multiple_instances (see https:/
- We now use the plugin's original code as a base and if it doesn't have one, we use its classname.
- We then look through all other instances of the plugin to find the instance with the highest sequence number. Why do we do this? Imagine you have two instances of a plugin with the code "foo". One instance will have code "foo" while the other one has "foo_2". If you delete instance "foo" and then install a new one, you _could_ end up with the code "foo_2" -- which already exists. My algorithm would assign "foo_3" which is an unique code.
- If we haven't found other instances with sequential codes, we just use $number_
The plugin's name is changed as well (we append " #$seq_number"), just as it being done in EdB's branch.
Downloading now. I got way too tired yesterday, but some of your feedback on the other version sounded like you hit on things that (a) I was not super-happy with the code and (b) didn't test well. Like deleting out #2 of 3 or the original for example.
Anyway downloading now and it always takes a while. I'll get code review proper happening as I bounce in and out working on the stupid truck.