Skip to content

Conversation

@cedric-anne
Copy link
Contributor

@cedric-anne cedric-anne commented Jul 25, 2022

Changes description

Calling Plugin::isInstalled() prior to Plugin::isPluginActive()/Plugin::isActivated() is useless, as an active plugin is de facto installed. Thus, combining these checks on plugins that are not activated will generate 2 queries, instead of 1 if check is done only on active state.

Checklist

Please check if your PR fulfills the following specifications:

  • Tests for the changes have been added (should not be required)
  • Docs have been added/updated (no impact on docs)

References

Closes #N/A

@cedric-anne cedric-anne requested a review from btry July 25, 2022 09:06
@cedric-anne cedric-anne self-assigned this Jul 25, 2022
@cedric-anne cedric-anne force-pushed the task/save-db-queries branch from e9c0c81 to b47aa95 Compare July 25, 2022 09:07
btry
btry previously approved these changes Jul 25, 2022
@cedric-anne cedric-anne force-pushed the task/save-db-queries branch 2 times, most recently from 0c01d56 to 6645f2b Compare July 25, 2022 10:26
@cedric-anne cedric-anne requested a review from btry July 25, 2022 10:56
btry
btry previously approved these changes Jul 25, 2022
@btry btry force-pushed the task/save-db-queries branch from 6645f2b to c382af2 Compare July 27, 2022 07:22
@btry btry merged commit 96eb6d8 into pluginsGLPI:develop Jul 27, 2022
@cedric-anne cedric-anne deleted the task/save-db-queries branch July 27, 2022 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants