The is_plugin_active() function can give false positives

Bug #1609112 reported by Robert Lyon on 2016-08-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
High
Robert Lyon
15.04
High
Unassigned
15.10
High
Unassigned
16.04
High
Unassigned
16.10
High
Robert Lyon

Bug Description

This is due to the fact that we have different plugin types with the same name, eg:

Artefact | Blocktype
-----------+------------
blog | blog
comment | comment
annotation | annotation

And that we check the type 'artefact' first so in the case of the Artefact 'annotation' being active but the blocktype 'annotation' not being active we will get 'true' from is_plugin_active()

We need to alter the function and pass it a 'type' so we can indicate which of the types we are interested in.

I'll mark this as 'high' as this could lead to confusion in the use of the function.

Reviewed: https://reviews.mahara.org/6786
Committed: https://git.mahara.org/mahara/mahara/commit/f30bcd1215f1ef697aa2d463b423596b47a3cbc6
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit f30bcd1215f1ef697aa2d463b423596b47a3cbc6
Author: Robert Lyon <email address hidden>
Date: Wed Aug 3 08:25:09 2016 +1200

Bug 1609112: Pass the plugin type to is_plugin_active()

So that we can differentiate between plugin types that have the same
plugin name, eg comment artefact vs comment blocktype

behatnotneeded

Change-Id: I0f7ffe6da3f7a4ff88cf625a1010c6d2012932d0
Signed-off-by: Robert Lyon <email address hidden>

Mahara Bot (dev-mahara) wrote :

Patch for "15.10_STABLE" branch: https://reviews.mahara.org/6801

Mahara Bot (dev-mahara) wrote :

Patch for "15.04_STABLE" branch: https://reviews.mahara.org/6802

Reviewed: https://reviews.mahara.org/6800
Committed: https://git.mahara.org/mahara/mahara/commit/2c392069227389c20fde356fb8c41697fd03f8a6
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.04_STABLE

commit 2c392069227389c20fde356fb8c41697fd03f8a6
Author: Robert Lyon <email address hidden>
Date: Wed Aug 3 08:25:09 2016 +1200

Bug 1609112: Pass the plugin type to is_plugin_active()

So that we can differentiate between plugin types that have the same
plugin name, eg comment artefact vs comment blocktype

behatnotneeded

Change-Id: I0f7ffe6da3f7a4ff88cf625a1010c6d2012932d0
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit f30bcd1215f1ef697aa2d463b423596b47a3cbc6)

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/6801
Committed: https://git.mahara.org/mahara/mahara/commit/c200b0861d2a1eb5211692841c7b07e8cd2c2fed
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.10_STABLE

commit c200b0861d2a1eb5211692841c7b07e8cd2c2fed
Author: Robert Lyon <email address hidden>
Date: Wed Aug 3 08:25:09 2016 +1200

Bug 1609112: Pass the plugin type to is_plugin_active()

So that we can differentiate between plugin types that have the same
plugin name, eg comment artefact vs comment blocktype

behatnotneeded

Change-Id: I0f7ffe6da3f7a4ff88cf625a1010c6d2012932d0
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit f30bcd1215f1ef697aa2d463b423596b47a3cbc6)

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/6802
Committed: https://git.mahara.org/mahara/mahara/commit/80f10a5cd72d82d111930d674846bf13a4cdae6c
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.04_STABLE

commit 80f10a5cd72d82d111930d674846bf13a4cdae6c
Author: Robert Lyon <email address hidden>
Date: Wed Aug 3 08:25:09 2016 +1200

Bug 1609112: Pass the plugin type to is_plugin_active()

So that we can differentiate between plugin types that have the same
plugin name, eg comment artefact vs comment blocktype

behatnotneeded

Change-Id: I0f7ffe6da3f7a4ff88cf625a1010c6d2012932d0
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit f30bcd1215f1ef697aa2d463b423596b47a3cbc6)

Robert Lyon (robertl-9) on 2016-10-21
Changed in mahara:
milestone: 16.10.0 → none
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers