X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fogroups%2Fclass_termgroup.inc;h=a05c6a1c0de4fbb3195d818ada9e9cd70fd6ec28;hb=03ace41f27d274a8a82ad57defa833bf6cecd6d6;hp=3d9a69b5603c6b336972758f9925f25318a577a9;hpb=cb97b741e8efc59693a9f40dbc373ce75db96b33;p=gosa.git diff --git a/plugins/admin/ogroups/class_termgroup.inc b/plugins/admin/ogroups/class_termgroup.inc index 3d9a69b56..a05c6a1c0 100644 --- a/plugins/admin/ogroups/class_termgroup.inc +++ b/plugins/admin/ogroups/class_termgroup.inc @@ -25,6 +25,8 @@ class termgroup extends plugin var $attributes = array("gotoMode","gotoSyslogServer", "gotoNtpServer"); var $objectclasses = array("gotoWorkstationTemplate"); var $CopyPasteVars = array("gotoNtpServers","modes","inheritTimeServer","members"); + var $view_logged = FALSE; + function termgroup ($config, $dn= NULL, $parent= NULL) { @@ -95,8 +97,6 @@ class termgroup extends plugin unset($this->gotoNtpServers[$key]); } } - - } function check() @@ -129,6 +129,7 @@ class termgroup extends plugin $ldap->cd($this->orig_dn); $ldap->modify($this->attrs); $this->handle_post_events("remove"); + @log::log("remove","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } @@ -165,12 +166,6 @@ class termgroup extends plugin $ldap->cd ($key); $ldap->modify($attrs); show_ldap_error($ldap->get_error(),sprintf(_("Setting action state (FAIstate) failed for object '%s', value was '%s'."),$key,$action)); - - if(!preg_match("/success/i",$ldap->get_error())) { - gosa_log("FAILED !! Updating FAIstate to '".$action."' : ".$key); - }else{ - gosa_log("OK. Updating FAIstate to '".$action."' : ".$key); - } } } } @@ -180,6 +175,10 @@ class termgroup extends plugin /* Call parent execute */ plugin::execute(); + if(!$this->view_logged){ + $this->view_logged = TRUE; + @log::log("view","ogroups/".get_class($this),$this->dn); + } /*************** Handle requested action @@ -369,6 +368,12 @@ class termgroup extends plugin $this->cleanup(); $ldap->modify ($this->attrs); + if($this->initially_was_account){ + @log::log("modify","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + }else{ + @log::log("create","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + } + if(!$this->didAction){ $this->handle_post_events("modify"); }