diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2010-12-24 23:43:10 -0700 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2010-12-24 23:43:10 -0700 |
commit | 37c03d68a82fb978d46d3a9e7c9051983de38b3d (patch) | |
tree | 0aa9066fb5f0f68e3c48ec28ba3db5acb329846f /plugins/OStatus/OStatusPlugin.php | |
parent | 26baad63f2e7d5cd0f783aacdb9eb2a65a638656 (diff) |
Add a more robust plugin config system.
2010-11-20: Luke Shumaker <lukeshu@sbcglobal.net>
Add a more robust (but backward compatible) plugin config system
* lib/util.php: add common_config_section($main), as a companion to common_config($main,$sub)
* lib/statusnet.php:
Functions for other Places:
- add public static pluginFiles($name) which returns a list of all possible filenames a plugin with $name could be defined in.
- addPlugin(...): use self::pluginFiles(...) instead of a hard-coded list.
Actual Functionality:
- add public static getPlugins() which returns
array_merge(
common_config('plugins','default'),
common_config_section('plugin-list')
)
- use self::getPlugins() instead of common_config('plugins','default')
Robustness:
- handle plugins that have a type other than "array" or "null" for parameters without bugging out
* actions/pluginenable.php: (in order of in the file):
- use StatusNet::getPlugins() instead of common_config('plugins','default')
- check if a plugin exists, not whether it is loaded (uses newly added StatusNet::pluginFiles(...))
- Also save to 'plugin-list' (the new plugin system), in addition to 'plugins' (the old plugin system)
Diffstat (limited to 'plugins/OStatus/OStatusPlugin.php')
0 files changed, 0 insertions, 0 deletions