Bug #2384
closed
Use CB API to get plugin and tab object from cache instead of loading from database
Added by beat over 13 years ago.
Updated over 13 years ago.
Description
cbgroupjive.class.php line 1110:
cbgjClass::getPlugin() should use CB's $_PLUGIN API to get the plugin object and not load from database.
Also CB's API should be used to load the tab object properly.
That will automatically load params as well.
- Status changed from New to Feedback
- Assignee changed from krileon to beat
Class file is (module) and can be loaded externally, wouldn't extending the class by cbPluginHandler cause problems? Used queries to build object so can be used completely externally.
- Status changed from Feedback to Assigned
- Assignee changed from beat to krileon
$_PLUGINS has this method:
/**
* Returns plugin of group $group and element $element
* @since 1.3
*
* @param string $group
* @param string $element
* @return moscomprofilerPlugin or FALSE if not loaded
*/
function getLoadedPlugin( $group, $element ) {
For CB tabs, there is no caching in CB 1.4, so for now, database query is ok. CB 2.0 will be different here.
- Status changed from Assigned to Feedback
- Assignee changed from krileon to beat
Using results in loading getLoadedPlugin( $group, $element ) and it's class instance, but the params are not prepared and are completely raw. Seams like more overhead to use this function given it loads the entire class instance of CBplug_cbgroupjive when all that is needed is it's database object. In addition to this oddly soon as I remove the query the function no longer returns the plugin object (user plugin group is loaded at top of class file). Another problem is if the plugin is set to Registered, then the $plugin object will be NULL (because access checks are done in loadPluginGroup), which is not desired as the API needs to still be accessible for 3rd party integrations. Proposing upgrading upon CB 2.0 methods implemented and using as current (current usage is cached).
- Status changed from Feedback to Rejected
- % Done changed from 0 to 100
OK then, closing as rejected then :-)
Also available in: Atom
PDF