index 9f7923ea75c24aed3663c1f95191a983c43dfee5..953f18ddaab3023caf0e722c82c3ce6e4a25aa6e 100644 (file)
--- a/include/class_plugin.inc
+++ b/include/class_plugin.inc
$message= array();
/* Skip if we've no config object */
- if (!isset($this->config)){
+ if (!isset($this->config) || !is_object($this->config)){
return $message;
}
/* Find hooks entries for this class */
- $command= $this->config->search(get_class($this), "CHECK",array('menu'));
- if ($command == "" && isset($this->config->data['TABS'])){
- $command= $this->config->search(get_class($this), "CHECK",array('tabs'));
- }
+ $command= $this->config->search(get_class($this), "CHECK", array('menu', 'tabs'));
if ($command != ""){
function postcreate($add_attrs= array())
{
/* Find postcreate entries for this class */
- $command= $this->config->search(get_class($this), "POSTCREATE",array('menu'));
- if ($command == "" && isset($this->config->data['TABS'])){
- $command= $this->config->search(get_class($this), "POSTCREATE",array('tabs'));
- }
+ $command= $this->config->search(get_class($this), "POSTCREATE",array('menu', 'tabs'));
if ($command != ""){
function postmodify($add_attrs= array())
{
/* Find postcreate entries for this class */
- $command= $this->config->search(get_class($this), "POSTMODIFY",array('menu'));
- if ($command == "" && isset($this->config->data['TABS'])){
- $command= $this->config->search(get_class($this), "POSTMODIFY",array('tabs'));
- }
+ $command= $this->config->search(get_class($this), "POSTMODIFY",array('menu','tabs'));
if ($command != ""){
function postremove($add_attrs= array())
{
/* Find postremove entries for this class */
- $command= $this->config->search(get_class($this), "POSTREMOVE",array('menu'));
- if ($command == "" && isset($this->config->data['TABS'])){
- $command= $this->config->search(get_class($this), "POSTREMOVE",array('tabs'));
- }
-
+ $command= $this->config->search(get_class($this), "POSTREMOVE",array('menu','tabs'));
if ($command != ""){
/* Additional attributes */