From: hickert Date: Mon, 10 May 2010 12:17:36 +0000 (+0000) Subject: Replaced config->search with get_cfg_value X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5c2d01aab3c13cca9f03b4983a3a00b4ea47ae51;p=gosa.git Replaced config->search with get_cfg_value git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18217 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_management.inc b/gosa-core/include/class_management.inc index 2e42c572e..66bdc4cf2 100644 --- a/gosa-core/include/class_management.inc +++ b/gosa-core/include/class_management.inc @@ -950,55 +950,13 @@ class management function postcreate() { - $this->_handlePostEvent('POSTCREATE'); + $this->handle_post_events('create'); } function postmodify(){ - $this->_handlePostEvent('POSTMODIFY'); + $this->handle_post_events('modify'); } function postremove(){ - $this->_handlePostEvent('POSTREMOVE'); - } - - function _handlePostEvent($type) - { - - /* Find postcreate entries for this class */ - $command= $this->config->search(get_class($this), $type,array('menu', 'tabs')); - if ($command != ""){ - - /* Walk through attribute list */ - foreach ($this->attributes as $attr){ - if (!is_array($this->$attr)){ - $add_attrs[$attr] = $this->$attr; - } - } - $add_attrs['dn']=$this->dn; - - $tmp = array(); - foreach($add_attrs as $name => $value){ - $tmp[$name] = strlen($name); - } - arsort($tmp); - - /* Additional attributes */ - foreach ($tmp as $name => $len){ - $value = $add_attrs[$name]; - $command= str_replace("%$name", "$value", $command); - } - - if (check_command($command)){ - @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, - $command, "Execute"); - exec($command,$arr); - foreach($arr as $str){ - @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, - $command, "Result: ".$str); - } - } else { - $message= msgPool::cmdnotfound($type, get_class($this)); - msg_dialog::display(_("Error"), $message, ERROR_DIALOG); - } - } + $this->handle_post_events('remove'); } function is_modal_dialog()