Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename some methods in Plugin Manager #6009

Closed
tsteur opened this issue Aug 15, 2014 · 1 comment
Closed

Rename some methods in Plugin Manager #6009

tsteur opened this issue Aug 15, 2014 · 1 comment
Assignees
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Aug 15, 2014

We should rename some methods to prevent possible bugs in the future. For instance I was using the loadPlugin() method because I was assuming a different behavior based on the name. Especially the naming should be clarified. I already added some doc blocks but we all know nearly nobody is reading them :)

  • returnLoadedPluginsInfo() does not return only the loaded plugins but it loads all even not activated ones. So next call to getLoadedPlugins() will return all plugins, even not activated ones whereas before only activated ones are returned.
  • loadPlugin() only loads a plugin
  • loadPlugins() loads and activates plugins. Whereas loadPlugin adds one new plugin I would assume loadPlugins adds multiple new plugins but it actually overwrite (sets) the activated plugins.

There might be some more methods that could be renamed. As it is not a public API it should not be a problem.

@tsteur tsteur added this to the Piwik 2.6.0 milestone Aug 15, 2014
@tsteur tsteur added the Task label Aug 15, 2014
tsteur added a commit that referenced this issue Aug 18, 2014
@tsteur tsteur modified the milestones: Piwik 2.8.0, Piwik 2.7.0 Sep 15, 2014
@mattab mattab modified the milestones: Piwik 2.9.0, Piwik 2.8.0 Oct 13, 2014
@tsteur
Copy link
Member Author

tsteur commented Oct 31, 2014

Done. I won't rename any other methods as most of them are used in Piwik PRO plugin although they are not API.

@tsteur tsteur closed this as completed Oct 31, 2014
tsteur added a commit that referenced this issue Oct 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

2 participants