summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 89ec0eb)
raw | patch | inline | side by side (parent: 89ec0eb)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 10 May 2010 12:17:36 +0000 (12:17 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 10 May 2010 12:17:36 +0000 (12:17 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18217 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_management.inc | patch | blob | history |
index 2e42c572eca2fd1fd97b342d2064e1a900a9775a..66bdc4cf2b73a201e86ef9ecc36b881d2bb39540 100644 (file)
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()