From 533f1dd192a3ecf0c7aab30671d717b9f8969abe Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 24 Sep 2007 09:21:58 +0000 Subject: [PATCH] Fixed multiple calls of config->search. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7385 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_plugin.inc | 11 ++--------- plugins/admin/systems/class_goService.inc | 6 +----- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/include/class_plugin.inc b/include/class_plugin.inc index b957567d1..953f18dda 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -598,10 +598,7 @@ class plugin 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 != ""){ @@ -633,11 +630,7 @@ class plugin 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 */ diff --git a/plugins/admin/systems/class_goService.inc b/plugins/admin/systems/class_goService.inc index afbbf3001..edfd3d7d5 100644 --- a/plugins/admin/systems/class_goService.inc +++ b/plugins/admin/systems/class_goService.inc @@ -178,11 +178,7 @@ class goService extends plugin{ function action_hook($add_attrs= array()) { /* Find postcreate entries for this class */ - $command= $this->config->search(get_class($this), "ACTION_HOOK",array('menu')); - if ($command == "" && isset($this->config->data['TABS'])){ - $command= $this->config->search(get_class($this), "ACTION_HOOK",array('tabs')); - } - + $command= $this->config->search(get_class($this), "ACTION_HOOK",array('menu','tabs')); if ($command != ""){ /* Walk through attribute list */ -- 2.30.2